home *** CD-ROM | disk | FTP | other *** search
/ The Original Shareware 1.1 / The Original Shareware (WeMake CDs)(Volume 1.1)(CDs, Inc)(1993).iso / 16 / anarkey2.zip / ANARKEY.DOC < prev    next >
Text File  |  1989-05-01  |  123KB  |  2,561 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.                                     ANARKEY
  10.                                   User Manual
  11.  
  12.  
  13.                                   Version 2.00
  14.  
  15.  
  16.  
  17.  
  18.  
  19.                    Anarchy : a state of being without rulers
  20.  
  21.                    Anarkey : a state of being without keystrokes
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.                                 Steven Calwas
  37.                                Moderne Software
  38.                                 P.O. Box 3638
  39.                           Santa Clara, CA 95055-3638
  40.  
  41.  
  42.                               _______
  43.                          ____|__     |               (tm)
  44.                       --|       |    |-------------------
  45.                         |   ____|__  |  Association of
  46.                         |  |       |_|  Shareware
  47.                         |__|   o   |    Professionals
  48.                       -----|   |   |---------------------
  49.                            |___|___|    MEMBER
  50.  
  51.  
  52.  
  53.  
  54.                             Copyright (C) 1988, 1989
  55.                                 by Steven Calwas
  56.                                All rights reserved
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.                                 Introduction
  69.                                 ------------
  70.  
  71.    ANARKEY is a command-line editor that will significantly reduce the
  72. number of keystrokes you make when entering DOS commands.  Among its many
  73. capabilities, ANARKEY supports:
  74.  
  75.         o  Command-line editing features comparable to those found in
  76.            expensive word processors
  77.  
  78.         o  Storage and retrieval of past command lines
  79.  
  80.         o  Two methods of command line retrieval:
  81.                 1) sequential access
  82.                 2) character matching where you enter a portion of the
  83.                 line and have ANARKEY search through the buffer for a
  84.                 matching completion
  85.  
  86.         o  A text substitution capability called an AKA (often referred to
  87.            as an "alias" or "synonym" in other command-line editors).  A
  88.            utility program is included in the ANARKEY package that will
  89.            convert the alias and synonym definitions of other editors to the
  90.            equivalent ANARKEY format.
  91.  
  92.         o  Multiple commands per line
  93.  
  94.         o  A 255-character command line
  95.  
  96.         o  File name completion, including directory and program names
  97.  
  98.         o  Environment variable editing
  99.  
  100.         o  Configurable keystroke assignments
  101.  
  102.         o  Writing the command-line history buffer to a disk file
  103.  
  104.         o  Loading the history buffer and AKA definitions from disk files at
  105.            any time
  106.  
  107.         o  And much more!
  108.  
  109.  
  110.    ANARKEY is written 100% in assembly language for maximum efficiency in
  111. memory usage and execution speed.  When installed with the default 500-
  112. character history buffer, ANARKEY requires less than 7400 bytes of memory.
  113. A smaller buffer may be used, reducing memory usage even further.
  114.  
  115.    ANARKEY is distributed as shareware.  Each user is given the opportunity
  116. to evaluate the complete ANARKEY software package for 30 days with no
  117. obligation.  If, after the evaluation period, you find ANARKEY to be a
  118. useful tool, you must register your copy with the author, Steven Calwas.
  119.  
  120.    ANARKEY registration is only $25 which includes a copy of the next
  121. version when it becomes available.  Considering the large number of times
  122. you will be using ANARKEY during each computer session, this is an
  123. outstanding value.  Registered users of an earlier version may order the
  124. next version for only $6.
  125.  
  126.    An ANARKEY registration form is included in the distribution package in
  127. the file ORDERFRM.  Please take the time to fill it out and return it.  If
  128. you would like high-quality software to continue to be made available on a
  129. try-first basis and for a reasonable cost, it is up to YOU to support such
  130. programs.  Please do.
  131.  
  132.  
  133.  
  134.                             A Quick Introduction
  135.                             --------------------
  136.  
  137.    This section will outline some of the powerful capabilities ANARKEY
  138. provides.  It should give you an idea of whether or not you wish to examine
  139. ANARKEY in more depth.  All of the functions presented here are discussed in
  140. detail in subsequent sections of the manual.
  141.  
  142.    ANARKEY is shipped in a default configuration, however, a very large
  143. number of its characteristics are configurable to your specifications.  Some
  144. of the configurable characteristics are:
  145.  
  146.         o  ANARKEY keystrokes may be reconfigured by using ANARKED, the
  147.            ANARKEY Keystroke Editor.
  148.  
  149.         o  Powerup input mode can be set to either insert or overwrite.
  150.  
  151.         o  Cursor shape in each input mode can be set.  (The cursor shape
  152.            can also remain unchanged if you so desire.)
  153.  
  154.         o  Command-line history buffer can hold from 255 to 50,000
  155.            characters.
  156.  
  157.         o  The length of the shortest line to store in the history buffer
  158.            can be set.
  159.  
  160.         o  Switch character conventions common to the UNIX operating system
  161.            (i.e. directories separated by a slash, '/', and options preceded
  162.            by a dash, '-') may be used.  This feature works for "internal"
  163.            DOS commands, such as COPY and DIR, as well as "external"
  164.            commands, like XCOPY and LINK.
  165.  
  166.  
  167.    In addition to a high degree of malleability, ANARKEY brings to the DOS
  168. command line many of the editing features available in expensive word
  169. processors.  For example, the cursor may be positioned anywhere on the
  170. command line without destructively backspacing through characters.  Also,
  171. individual characters or entire words may be easily inserted or deleted
  172. anywhere on the line.
  173.  
  174.    Each command line you enter is stored by ANARKEY in a "history buffer."
  175. These stored lines may be retrieved whenever you wish to execute them again.
  176. The retrieved line may be edited before being executed or may be sent for
  177. immediate execution upon retrieval.  Never again will you retype a command
  178. line.
  179.  
  180.    ANARKEY provides two methods of line retrieval.  The Up and Down
  181. Arrow keys can be used to cycle sequentially through the history buffer and
  182. retrieve one line at a time.  When you get to the line you want, you may
  183. then edit and execute it.
  184.  
  185.    The second and more powerful retrieval method accepts one or more
  186. characters of the desired line and then searches through the history buffer
  187. until it finds a line starting with the same character(s).  The matching
  188. line is then entered on the command line.  If the retrieved line is not the
  189. desired line, the search may be continued and the next matching line
  190. retrieved.  This method of line completion is extremely powerful, especially
  191. when the desired line is buried deep in the history buffer.  Once you learn
  192. how to use this capability, you'll wonder how you ever lived without it!
  193.  
  194.    ANARKEY also supports the entering of multiple commands on a single input
  195. line.  This can be used to group a sequence of related commands together on
  196. one line.  For example, say you want to edit a letter and then print it.
  197. Using DOS, this may require two lines: one to execute the word processor and
  198. another to print the text file.  With ANARKEY, both commands can be placed
  199. on the same line.
  200.  
  201.    To make it easy to fit more than one command on the line, ANARKEY will
  202. accept input lines consisting of up to 255 characters.
  203.  
  204.    ANARKEY provides a feature called an AKA (pronounced A-K-A) that allows
  205. you to assign a single word to represent a long string of commands.  Later,
  206. when you enter the single word on the command line, ANARKEY will replace it
  207. with the long line and execute it.  For example, you may associate the
  208. letter "D" to represent the string "DIR."  Afterward, simply entering the
  209. single character "D" on the command line will cause ANARKEY to execute the
  210. associated string ("DIR").
  211.  
  212.    An AKA may consist of multiple commands.  Thus, by using an AKA, a single
  213. character can execute several complicated commands.  In this respect, an AKA
  214. is much like a DOS batch file.
  215.  
  216.    And, like a batch file, an AKA may contain parameters.  AKA parameters
  217. are specified by using the DOS batch conventions %1 through %9.  As an
  218. example, you may define the AKA "T" to represent the string "TYPE %1."
  219. Subsequently, the command "T ANARKEY.DOC" will be expanded to "TYPE
  220. ANARKEY.DOC."  The advantage provided by an AKA over a batch file is that
  221. the AKA will execute much more quickly than the equivalent batch file.
  222.  
  223.    An AKA may be defined on the command line or read in from a disk file.
  224. If you are already using a command-line editor that supports aliases or
  225. synonyms, the CONVERT program is provided in the ANARKEY package to
  226. translate your aliases and synonyms into an equivalent AKA format.
  227.  
  228.    ANARKEY will also complete the names of files, programs and directories
  229. for you.  Simply type in zero(!) or more characters and ANARKEY will cycle
  230. through all of the existing files with matching characters.  This may seem
  231. like a minor convenience, but, once you become used to it, you'll never
  232. want to go back to entering an entire file specification again.
  233.  
  234.    How often have you needed to add one more directory to your PATH
  235. environment variable?  Doing so in plain vanilla DOS is a pain because you
  236. have to retype the entire PATH sequence.  Not so with ANARKEY.  ANARKEY will
  237. retrieve the current PATH setting and enter it on the command line for you.
  238. From there you may edit the line as you wish.  This feature is not
  239. restricted to the PATH variable either; ANARKEY will retrieve ANY
  240. environment variable and allow you to modify it.
  241.  
  242.    All of these features and much more are included in ANARKEY.  If you
  243. would like to learn how to use these capabilities and relieve yourself of
  244. the drudgery of entering DOS commands then read on.
  245.  
  246.  
  247.  
  248.                                Getting Started
  249.                                ---------------
  250.  
  251.    ANARKEY is ready to run "right out of the box."  Simply enter its program
  252. name on the DOS command line and ANARKEY will install itself.  ANARKEY may
  253. also be installed by running it from a batch file, such as AUTOEXEC.BAT.
  254.  
  255.    ANARKEY is a TSR (Terminate-and-Stay-Resident) program.  When executed
  256. from the command line or from a batch file, it will install itself and then
  257. return control to the DOS command prompt.  During the installation process,
  258. a short sign-on message will appear, such as:
  259.  
  260.         C>ANARKEY
  261.         Anarkey 2.00
  262.         Copyright (C) 1988, 1989 by Steven Calwas.  All rights reserved.
  263.  
  264.         Establishing a 500-character history buffer.
  265.  
  266.         C>_
  267.  
  268. Note:
  269.    If you are running ANARKEY for the first time and a message appears
  270. stating the program is already installed, refer to the section "Installation
  271. Options -- ANARKEY Process Number" for instructions on installing ANARKEY on
  272. your machine.
  273.  
  274.    Many of ANARKEY's features may be configured by specifying program
  275. options at installation time.  The supported options are described in the
  276. "Installation Options" section later in this manual.
  277.  
  278.    After installation, ANARKEY handles all input requests for the following
  279. situations:
  280.  
  281.         --the DOS command line
  282.         --redirected input
  283.         --DEBUG, SYMDEB, EDLIN and several third-party programs
  284.  
  285.    Notice that commands executed from a batch file are NOT processed by
  286. ANARKEY.
  287.  
  288.    Many powerful features are available once ANARKEY is installed.  They are
  289. all described in the remainder of this manual.
  290.  
  291.  
  292.  
  293.                              Manual Organization
  294.                              -------------------
  295.  
  296.    The supported ANARKEY functions and related topics are grouped into the
  297. following categories:
  298.  
  299.         --Line Editing Functions
  300.         --History Buffer Functions
  301.         --AKA Functions
  302.         --File Name Completion Functions
  303.         --Entering Multiple Commands per Line
  304.         --Editing Environment Variables
  305.         --Installation Options
  306.         --ANARKEY Internals
  307.         --Special Considerations
  308.         --Future Directions
  309.         --The Spirit of ANARKEY
  310.  
  311.    All of the supported functions are explained in detail within one of
  312. these categories.  In addition, a brief summary of all ANARKEY functions is
  313. outlined in the file ANARKEY.SUM.  You may find it helpful to keep a listing
  314. of ANARKEY.SUM alongside your keyboard while you are learning the ANARKEY
  315. commands.
  316.  
  317.    Each documented ANARKEY function consists of two parts: a "function name"
  318. and a "keystroke invocation."  The function name is simply a descriptive tag
  319. assigned to a function, just as a person's name is a kind of tag.  The
  320. keystroke invocation is the keystroke or keystrokes entered by the user
  321. which cause the function to be executed.
  322.  
  323.    The function definitions documented in this manual use the following
  324. format:
  325.  
  326.    <Keystroke Invocation>  -- Function Name
  327.  
  328.    The keystroke invocation is always contained within < > symbols.  The < >
  329. symbols are not part of the keystroke invocation and should not be entered
  330. as such.  Examples of some of the ANARKEY function definitions are:
  331.  
  332.    <Home>             -- Cursor to Start of Line
  333.  
  334.    <F5>               -- Find History Buffer Match and Edit
  335.    <Ctrl-K>
  336.  
  337.    In the first example, the keystroke invocation for the Cursor-to-Start-
  338. of-Line function is the <Home> key.  In other words, pressing the <Home> key
  339. will instruct ANARKEY to perform the Cursor-to-Start-of-Line function.
  340.  
  341.    Some functions have two possible keystroke invocations, as in the second
  342. example above.  Entering either of the keystroke invocations will cause
  343. ANARKEY to perform the indicated function.  The example above shows that the
  344. Find-History-Buffer-Match-and-Edit function may be executed by pressing
  345. either the <F5> or <Ctrl-K> keys.  Which invocation you decide to use
  346. depends upon which keystroke you are most comfortable making.
  347.  
  348.    Keystroke invocations are not case-sensitive.  Thus, the keystrokes
  349. <Ctrl-K> and <Ctrl-k> are equivalent.
  350.  
  351.    Note: All keystroke invocations can be modified by ANARKED, the ANARKEY
  352. Keystroke Editor.  For instructions, refer to the "ANARKED User Manual."
  353.  
  354.  
  355.  
  356.                            Line Editing Functions
  357.                            ----------------------
  358.  
  359.    ANARKEY provides line editing functions commonly found in word processing
  360. programs.  These functions include cursor movement, character deletion,
  361. character retrieval and some general purpose features.
  362.  
  363.    <Enter>            -- Send Line to Command Processor
  364.         The input line is passed to ANARKEY for "acceptance."  The cursor
  365.         need not be at the end of the line for the whole line to be
  366.         accepted; the entire command line is always accepted, regardless of
  367.         the cursor position.
  368.  
  369.         The acceptance process includes "breaking" the line into separate
  370.         commands, checking that each command's length is within the
  371.         allowable range, and sending the commands individually to the
  372.         command processor.  (This process is discussed in depth in the
  373.         "Entering Multiple Commands per Line" section.)
  374.  
  375.    <Ins>              -- Toggle Insert/Overwrite Mode
  376.         ANARKEY supports two modes of text input: insert mode and overwrite
  377.         mode.  When editing in insert mode, characters entered will be
  378.         "inserted" into the current input line; any characters to the right
  379.         of the inserted character are shifted over to make room.  Characters
  380.         entered in overwrite mode will "write over" the character under the
  381.         current cursor position; no shifting of characters occurs as in
  382.         insert mode.
  383.  
  384.         The <Ins> key toggles the two input modes.  By default, once the
  385.         mode has been set, ANARKEY remains in that mode until the <Ins> key
  386.         is pressed again.  (The input mode can be forced to a particular
  387.         setting at the start of each new input line by using the 'F'
  388.         modifier to the -I installation option.  Refer to the section
  389.         "Installation Options, Input Mode on Powerup" for further details.)
  390.  
  391.         The default input mode upon program powerup is insert mode.  If you
  392.         prefer ANARKEY to default to overwrite mode on powerup, use the -I
  393.         option (explained in "Installation Options, Input Mode on Powerup").
  394.  
  395.         ANARKEY indicates the current input mode by setting the cursor
  396.         shape.  An underscore cursor is used in the powerup mode; the
  397.         alternate mode uses a block cursor.  The following table illustrates
  398.         the cursor shapes used depending upon the powerup mode.
  399.  
  400.         Powerup mode = Insert (default and -II option)
  401.                 Insert mode cursor    = underscore
  402.                 Overwrite mode cursor = block
  403.  
  404.         Powerup mode = Overwrite (-IO option)
  405.                 Insert mode cursor    = block
  406.                 Overwrite mode cursor = underscore
  407.  
  408.         Cursor shape changes can be repressed by including the -C option on
  409.         the installation command line (see "Installation Options, Cursor
  410.         Shape Remains Unchanged").
  411.  
  412.    <Ctrl-U>           -- Accept Next Keystroke Unmodified
  413.         Enter the next keystroke into the input line, bypassing any ANARKEY
  414.         function interpretation.
  415.  
  416.         Occasionally, you may wish to enter a keystroke on the input line
  417.         that would normally be interpreted by ANARKEY as a keystroke
  418.         invocation.  For example, say you wanted to send a formfeed
  419.         character to your printer.  One way to accomplish this might be to
  420.         enter a formfeed on the command line and then redirect the line to
  421.         the printer.  The formfeed character is <Ctrl-L>.  However, <Ctrl-L>
  422.         is normally interpreted by ANARKEY as an invocation of the Find-
  423.         History-Match-and-Execute function.  To prevent ANARKEY from
  424.         interpreting the <Ctrl-L> as a keystroke invocation, precede it with
  425.         a <Ctrl-U>.  Thus, the two keystroke sequence <Ctrl-U> <Ctrl-L> will
  426.         enter a <Ctrl-L> character on the input line.
  427.  
  428.         This function may also be used to enter ANSI escape sequences on the
  429.         input line.  Simply precede the <Esc> key with a <Ctrl-U> keystroke.
  430.         Being able to enter an <Esc> character on the input line will allow
  431.         you to create AKAs that assign string constants to the function
  432.         keys, define an elaborate command-line prompt, and set the screen
  433.         colors.  Refer to the ANSI.SYS documentation that came with your
  434.         operating system or one of the public domain or shareware ANSI
  435.         device drivers for details on doing this.
  436.  
  437.    Cursor movement functions allow the cursor to be positioned anywhere on
  438. the input line.  Once the cursor has been placed in its desired position,
  439. further line modification operations, such as deleting or adding characters,
  440. may be performed.  The cursor movement functions provided by ANARKEY are
  441. discussed below.
  442.  
  443.    <Home>             -- Cursor to Start of Line
  444.         Position the cursor under the first character in the input line.
  445.  
  446.    <End>              -- Cursor to End of Line
  447.         Position the cursor after the last character in the input line.
  448.  
  449.    <Right Arrow>      -- Cursor Right One Character
  450.         Move the cursor one character to the right.
  451.  
  452.    <Ctrl-Right Arrow> -- Cursor Right One Word
  453.         Position the cursor under the start of the next word.
  454.  
  455.    <Left Arrow>       -- Cursor Left One Character
  456.         Move the cursor one character to the left.
  457.  
  458.    <Ctrl-Left Arrow>  -- Cursor Left One Word
  459.         Position the cursor under the start of the previous word.
  460.  
  461.    Also provided are functions to delete individual or groups of characters
  462. from the input line.
  463.  
  464.    <Backspace>        -- Delete Character Left
  465.         Move the cursor left one character and delete the character.  If the
  466.         current input mode is insert mode, any characters from the current
  467.         cursor position to the end of the line are shifted one character to
  468.         the left.  If the input mode is overwrite mode, no shift occurs.
  469.  
  470.    <Del>              -- Delete Current Character
  471.         Delete the character at the current cursor position.  All characters
  472.         from the cursor position to the end of the line are shifted one
  473.         character to the left, regardless of the current input mode.
  474.  
  475.    <Ctrl-T>           -- Delete Word Right
  476.         Delete all characters from the current cursor position until the
  477.         start of the next word.  All characters from the cursor position to
  478.         the end of the line are shifted to fill the space emptied by the
  479.         deleted word, regardless of the current input mode.
  480.  
  481.    <Ctrl-End>         -- Delete to End of Line
  482.    <Ctrl-Y>
  483.         Delete all characters from the current cursor position to the end of
  484.         the line.
  485.  
  486.    <Esc>              -- Delete Line
  487.         Clear the entire input line.  Position the cursor at the "home"
  488.         position.
  489.  
  490.         The CBL (current buffer line) pointer is moved to the end of the
  491.         history buffer.  The CBL is discussed in detail in "History Buffer
  492.         Functions."
  493.  
  494.    ANARKEY also supports two functions which are provided in the primitive
  495. DOS list of editing functions: the retrieval of single characters from the
  496. previous input line or the remainder of the previous line.
  497.  
  498.    <F1>               -- Retrieve Character From Previous Input Line
  499.         This function is identical to the DOS function associated with this
  500.         key.
  501.  
  502.         A character is retrieved from the previous input line and entered
  503.         into the current line.  The character retrieved is from the same
  504.         relative location as the current cursor position.  The cursor
  505.         position is advanced to the next character location.
  506.  
  507.         For example, if the cursor is at the third-character position in the
  508.         line when the <F1> key is hit, the third character from the previous
  509.         input line will be recalled and entered into the current line.
  510.         
  511.    <F3>               -- Retrieve Remainder of Previous Line and Edit
  512.         This function is identical to the DOS function associated with this
  513.         key.
  514.  
  515.         The remainder of the previous input line is retrieved and entered
  516.         into the current line.  The beginning of the retrieved portion is
  517.         from the same relative location as the current cursor position.  The
  518.         cursor is positioned at the end of the current line.  Editing may be
  519.         performed on the line.
  520.  
  521.    <Alt-F3>           -- Retrieve Remainder of Previous Line and Execute
  522.         This function is the same as the Retrieve-Remainder-...-and-Edit
  523.         function (<F3>) except that the line is immediately sent to the
  524.         command processor for execution.  The user is given no opportunity
  525.         to edit the line.
  526.  
  527.    Once you break the habit of leaning on the BackSpace key to correct any
  528. typing errors and begin to use the ANARKEY editing functions to their
  529. fullest, the blisters on your fingertips will clear up.  And your keyboard
  530. will thank you.
  531.  
  532.  
  533.  
  534.                           History Buffer Functions
  535.                           ------------------------
  536.  
  537. Introduction
  538. ------------
  539.  
  540.    The history buffer functions provide ANARKEY with the very powerful
  541. ability to quickly retrieve any previously-entered input line for either
  542. editing or immediate execution.
  543.  
  544.    Many work sequences done on a computer are repetitive.  For example, a
  545. programmer will edit a source file, compile it, link it and then execute it
  546. checking for any bugs.  If any problems are discovered, the whole cycle
  547. begins again.  Being able to quickly retrieve the commands entered during
  548. the first pass through this cycle relieves the user of much annoying
  549. busywork.
  550.  
  551.  
  552. The History Buffer
  553. ------------------
  554.  
  555.    ANARKEY stores all non-empty input lines in a "history buffer."  Lines
  556. consisting of multiple commands are placed in the buffer as a single intact
  557. line.  When ANARKEY is initially installed, the history buffer is empty.
  558. The first input line entered by the user is stored by ANARKEY at the very
  559. top of the history buffer.  Subsequent input lines are stored, one after
  560. another, toward the bottom of the buffer.  This concept is depicted in the
  561. following diagram which shows a history buffer completely filled with lines:
  562.  
  563.                         History Buffer
  564.                  ---------------------------- <--- Top of buffer
  565.                  | rem This is line one     |
  566.                  | rem Followed by line two |
  567.                  | rem Here's line three    |
  568.                  |/\/\/\/\/\/\/\/\/\/\/\/\/\|
  569.                               .
  570.                               .
  571.                               .
  572.                  |\/\/\/\/\/\/\/\/\/\/\/\/\/|
  573.                  | rem Last line in buffer  |
  574.                  |                          |
  575.                  ---------------------------- <--- Bottom of buffer
  576.  
  577.    Notice in the above diagram that there is an empty line at the bottom of
  578. the buffer, even though the buffer is considered full.  ANARKEY always
  579. reserves an empty line at the bottom of the buffer which it uses as a marker
  580. to signify the end of the buffer.  This end-of-buffer, empty-line marker is
  581. also useful to the user, as will become clear in the discussion on line
  582. retrieval.
  583.  
  584.    The contents of the history buffer may be viewed at any time.
  585.  
  586.    <F4>               -- Display History Buffer Contents
  587.         The input lines stored in the history buffer are displayed onscreen.
  588.         Lines are displayed beginning at the top of the buffer and advancing
  589.         to the end.
  590.  
  591.         When an entire screen of lines has been displayed, output will
  592.         pause.  Pressing any key will cause the next screenful of lines to
  593.         be displayed.  ANARKEY supports screens consisting of ANY number of
  594.         lines and columns per screen, including 25, 43 and 50 lines.
  595.  
  596.    Storing a new input line into a full history buffer is similar to how a
  597. display screen handles the entering of an additional line.  When a screen is
  598. full, room is made at the bottom of the screen by scrolling the other lines
  599. up.  The line which used to be at the top of the screen disappears.  The
  600. same operation occurs when storing an input line into a full history buffer.
  601. The line stored at the top of the buffer is permanently removed, all
  602. remaining lines are shifted up and the new input line is entered at the
  603. bottom of the buffer.  The effects of storing an additional line in a full
  604. history buffer are shown below:
  605.  
  606.                    rem This is line one       <--- Removed from buffer
  607.  
  608.                         History Buffer
  609.                  ---------------------------- <--- Top of buffer
  610.                  | rem Followed by line two |
  611.                  | rem Here's line three    |
  612.                  |/\/\/\/\/\/\/\/\/\/\/\/\/\|
  613.                               .
  614.                               .
  615.                               .
  616.                  |\/\/\/\/\/\/\/\/\/\/\/\/\/|
  617.                  | rem Last line in buffer  |
  618.                  | rem New last line        |
  619.                  |                          |
  620.                  ---------------------------- <--- Bottom of buffer
  621.  
  622.    The number of input lines which can be stored in the history buffer
  623. depends upon the length of the lines and the size of the buffer.  By
  624. default, the history buffer will hold 500 characters, but this may be
  625. configured during installation from 255 to 50,000 characters.  (Details are
  626. contained in the "Installation Options, History Buffer Size" section.)
  627.  
  628.  
  629. The Current Buffer Line or CBL
  630. ------------------------------
  631.  
  632.    ANARKEY maintains a location marker which always "points" to the
  633. beginning of one of the lines stored in the buffer.  The line at which this
  634. marker points is referred to as the "current buffer line" or CBL.  Everytime
  635. a new DOS command prompt appears, the CBL is reset to the end of the history
  636. buffer, which, as mentioned above, will always be an empty line.  Also,
  637. invoking the Delete-Line function (<Esc> key) will move the CBL to the end
  638. of the history buffer.
  639.  
  640.    The following diagram depicts a history buffer with the CBL set to the
  641. end of the buffer:
  642.  
  643.                         History Buffer
  644.                  ---------------------------- <--- Top of buffer
  645.                  | rem Followed by line two |
  646.                  | rem Here's line three    |
  647.                  |/\/\/\/\/\/\/\/\/\/\/\/\/\|
  648.                               .
  649.                               .
  650.                               .
  651.                  |\/\/\/\/\/\/\/\/\/\/\/\/\/|
  652.                  | rem Last line in buffer  |
  653.                  | rem New last line        |
  654.          CBL --->|                          |
  655.                  ---------------------------- <--- Bottom of buffer
  656.  
  657.  
  658. Moving History Buffer Lines
  659. ---------------------------
  660.  
  661.    During the course of entering command lines, many lines retrieved from
  662. the history buffer will be executed without being edited.  If these
  663. re-executed and unedited lines were stored in the buffer each time, the
  664. buffer would soon be cluttered with many copies of identical lines.  Besides
  665. creating an unnecessary mess, these duplicates would force other, less-often
  666. executed, lines out of the buffer.
  667.  
  668.    ANARKEY eliminates this problem.  Any line retrieved from the history
  669. buffer and "immediately accepted" is moved from its current location to the
  670. end of the buffer.  The phrase "immediately accepted" means that no editing
  671. is performed on the line and the cursor is not moved.  In other words, the
  672. very next keystroke must accept the line (<Enter>).
  673.  
  674.    By moving buffer lines, ANARKEY guarantees that heavily-executed lines
  675. will always be available for retrieval and the history buffer will not
  676. become cluttered with duplicate lines.
  677.  
  678.    The moving of retrieved lines is the default operation that ANARKEY
  679. performs.  However, situations may arise where a log of each command in
  680. their exact order of execution is desired.  This can be achieved by
  681. installing ANARKEY with the -F (full disclosure) option which represses the
  682. moving of retrieved buffer lines.  Refer to the "Installation Options, Full
  683. Disclosure" section for more information about this option.
  684.  
  685.  
  686. History Buffer Line Retrieval
  687. -----------------------------
  688.  
  689.    Moving the CBL pointer through the buffer is the method used to retrieve
  690. stored input lines.  ANARKEY provides two methods of retrieving input lines
  691. from the history buffer: "bidirectional sequential access" and "character
  692. matching."
  693.  
  694.  
  695. Sequential Access Retrieval
  696. ---------------------------
  697.  
  698.    With sequential access, the CBL is moved through the buffer one line at a
  699. time.  Each time the CBL is moved, the new line it points at in the buffer
  700. is retrieved and displayed on the current input line, replacing any line
  701. that was previously displayed.  Sequential access is "bidirectional" because
  702. the CBL pointer can be moved either up or down though the history buffer.
  703.  
  704.    When the CBL points at the end of the buffer, moving down will cause the
  705. CBL to circle around to point at the first line stored at the top of the
  706. buffer. Conversely, with the CBL at the top of the buffer, moving up will
  707. circle the CBL back to the end.
  708.  
  709.    The following diagram shows the CBL moved up one line from its previous
  710. location at the end of the buffer.  When the CBL was moved, the line it now
  711. points at would have been retrieved and displayed onscreen.
  712.  
  713.                         History Buffer
  714.                  ---------------------------- <--- Top of buffer
  715.                  | rem Followed by line two |
  716.                  | rem Here's line three    |
  717.                  |/\/\/\/\/\/\/\/\/\/\/\/\/\|
  718.                               .
  719.                               .
  720.                               .
  721.                  |\/\/\/\/\/\/\/\/\/\/\/\/\/|
  722.                  | rem Last line in buffer  |
  723.          CBL --->| rem New last line        |
  724.                  |                          |
  725.                  ---------------------------- <--- Bottom of buffer
  726.  
  727.    Bidirectional sequential access is performed by invoking the following
  728. ANARKEY functions:
  729.  
  730.    <Up Arrow>         -- Retrieve Previous History Buffer Line
  731.         Move the CBL pointer up one line.  Retrieve the line and display it
  732.         onscreen, replacing any previously displayed line.  Position the
  733.         cursor at the end of the displayed line.
  734.  
  735.         If the very next keystroke accepts the line (<Enter>), the retrieved
  736.         line is moved from its current position in the history buffer to the
  737.         buffer's end.  (Installing ANARKEY with the -F option will repress
  738.         this line movement.)
  739.  
  740.    <Down Arrow>       -- Retrieve Next History Buffer Line
  741.         Move the CBL pointer down one line.  Retrieve the line and display
  742.         it onscreen, replacing any previously displayed line.  Position the
  743.         cursor at the end of the displayed line.
  744.  
  745.         If the very next keystroke accepts the line (<Enter>), the retrieved
  746.         line is moved from its current position in the history buffer to the
  747.         buffer's end.  (Line movement can be repressed by installing ANARKEY
  748.         with the -F option.)
  749.  
  750.  
  751. Character Matching Retrieval
  752. ----------------------------
  753.  
  754.    The "character matching" method of line retrieval is one of the most
  755. powerful features available in ANARKEY.  With this method, a portion of a
  756. past input line is entered and a search is made through the history buffer
  757. for a line whose first characters match those just entered.  If a match is
  758. found, the line is retrieved from the buffer and entered onto the input
  759. line.
  760.  
  761.    Before performing the search operation, ANARKEY gathers together the
  762. characters it will use for the comparison.  It collects the characters
  763. beginning at the start of the line up until the cursor position.  The
  764. character under the cursor (if there is one) is NOT included in the search.
  765. The search begins in the history buffer at the CBL and continues up toward
  766. the top of the buffer until either a match is found or the top of the buffer
  767. is reached.  The comparison performed upon the collected input line
  768. characters and the retrieved buffer lines is not case-sensitive.
  769.  
  770.    The exact operations executed during a search are:
  771.  
  772.         1) The CBL pointer is moved up one line.
  773.         2) If moving the CBL pointer caused it to circle around to the
  774.            bottom of the history buffer, beep to signal that the CBL pointer
  775.            has traversed the entire buffer.  Also, clear the displayed input
  776.            line from the cursor position to the end of the line.  The search
  777.            operation is complete.
  778.         3) If the CBL pointer has not circled around, the CBL is retrieved
  779.            from the buffer, but is not displayed.
  780.         4) The character(s) collected from the current input line are
  781.            compared with the first character(s) in the retrieved line.
  782.         5) If the character(s) match, the remainder of the retrieved line is
  783.            displayed on the input line and the search operation is complete.
  784.         6) If the character(s) do not match, return to instruction (1) above
  785.            and repeat the cycle.
  786.  
  787.    If a matching line is found, but it is not the line you desire, the
  788. search may be continued and subsequent matching lines retrieved.
  789.  
  790.    As explained in the list of search operations above, if a matching line
  791. is found, it is entered onto the input line.  When this occurs, the cursor
  792. position is not changed.  The reason for this is so that if the search is
  793. continued, the same group of characters used in the original search, i.e.
  794. those from the start of the line up until the cursor position, will be used
  795. in the continuation.
  796.  
  797.    The character matching method of line retrieval is one of the most useful
  798. and powerful features of ANARKEY.  Using it provides you with the ability to
  799. enter only a single character and have ANARKEY complete the rest of the line
  800. for you.  After you are acquainted with this method, entering an entire
  801. input line yourself will become drudgery.
  802.  
  803.    To be certain everyone understands how to use the character matching
  804. method, an extended example is provided below.  But first, the ANARKEY
  805. functions that implement the character matching retrieval method are:
  806.  
  807.    <F5>               -- Find History Buffer Match and Edit
  808.    <Ctrl-K>
  809.         Perform a character matching line retrieval operation.  The
  810.         remainder of the matching retrieved line is displayed on the input
  811.         line, replacing any previously entered line.  The line may be edited
  812.         before being accepted.
  813.  
  814.         If the very next keystroke accepts the line (<Enter>), the retrieved
  815.         line is moved from its current position in the history buffer to the
  816.         buffer's end, unless ANARKEY was installed with the -F option.
  817.  
  818.    <F6>               -- Find History Buffer Match and Execute
  819.    <Ctrl-L>
  820.         This function is the same as the Find-Match-and-Edit function except
  821.         that the matching line is immediately sent to the command processor
  822.         for execution; the user is given no opportunity to edit the line.
  823.  
  824.         Since the retrieved line is immediately executed, it is moved to the
  825.         end of the history buffer.  (This movement is repressable by
  826.         installing ANARKEY with the -F option.)
  827.  
  828.         If the top of the buffer is reached without finding a matching line,
  829.         the current input line is not sent to the command processor; further
  830.         editing of the line may be performed.  The CBL will be set to the
  831.         end of the buffer.
  832.  
  833.  
  834. An Extended Example
  835. -------------------
  836.  
  837.    As an example of the character matching functions, assume we are sitting
  838. at a new line prompt (therefore, the CBL pointer references the empty line
  839. at the end of the history buffer) and the buffer contains the following
  840. lines:
  841.  
  842.                         History Buffer
  843.                  ------------------------------ <--- Top of buffer
  844.                  | cd \work\jasper\memos\text |
  845.                  | dir *.*                    |
  846.                  | copy *.txt a:              |
  847.                  | dir a:                     |
  848.          CBL --->|                            |
  849.                  ------------------------------ <--- Bottom of buffer
  850.  
  851.    Say we wish to move to the "\work\janice\memos\text" directory and copy
  852. all files with a .TXT extension to the A: drive.  Using the character
  853. matching retrieval method, here is how we can do it.
  854.  
  855.    First, we have to move to the desired directory.  Since we have already
  856. entered an input line similar to the one we now need (the CD line in the
  857. buffer), let's retrieve and edit that line.  Enter the first character of
  858. the line we want, as in:
  859.  
  860.                 C>c_
  861.  
  862.    The underscore shows the current cursor position.  Then invoke the Find-
  863. History-Buffer-Match-and-Edit function (<F5> or <Ctrl-K> key).  ANARKEY
  864. searches from the CBL up toward the top of the buffer for an input line
  865. whose first character is a 'C.'  It finds a matching line in the COPY
  866. command.  Thus, it retrieves that line from the buffer and displays it on
  867. the input line.  The current input line and history buffer are:
  868.  
  869.                 C>copy *.txt a:
  870.                    -
  871.  
  872.                         History Buffer
  873.                  ------------------------------ <--- Top of buffer
  874.                  | cd \work\jasper\memos\text |
  875.                  | dir *.*                    |
  876.          CBL --->| copy *.txt a:              |
  877.                  | dir a:                     |
  878.                  |                            |
  879.                  ------------------------------ <--- Bottom of buffer
  880.  
  881.    Notice that the cursor position on the input line has not changed (it is
  882. still immediately after the 'C').  Also, notice the CBL has been set to the
  883. retrieved buffer line.  Since this is not the line we want to execute,
  884. continue the search by invoking the Find-Match-and-Edit function again (<F5>
  885. or <Ctrl-K>).  This time ANARKEY finds a match with the desired CD command.
  886. That line is retrieved from the buffer and replaces the previously retrieved
  887. COPY command.  Now the input line and history buffer look like this:
  888.  
  889.                 C>cd \work\jasper\memos\text
  890.                    -
  891.  
  892.                         History Buffer
  893.                  ------------------------------ <--- Top of buffer
  894.          CBL --->| cd \work\jasper\memos\text |
  895.                  | dir *.*                    |
  896.                  | copy *.txt a:              |
  897.                  | dir a:                     |
  898.                  |                            |
  899.                  ------------------------------ <--- Bottom of buffer
  900.  
  901.    The input line can now be edited using the available line-editing
  902. functions. There are several different combinations of these functions which
  903. can be used to perform this operation.  One such combination is outlined
  904. below.
  905.  
  906.    User keystrokes                  Current input line and cursor position
  907.    ---------------                  --------------------------------------
  908.                                     C>cd \work\jasper\memos\text
  909.                                        -
  910.    <Ctrl-Right Arrow>               C>cd \work\jasper\memos\text
  911.                                           -
  912.    <Ctrl-Right Arrow>               C>cd \work\jasper\memos\text
  913.                                                -
  914.    <Right Arrow> <Right Arrow>      C>cd \work\jasper\memos\text
  915.                                                  -
  916.    <Ctrl-T>                         C>cd \work\ja\memos\text
  917.                                                  -
  918.    nice                             C>cd \work\janice\memos\text
  919.                                                      -
  920.  
  921.    Note: The last line in the example assumes the input mode is set to
  922. "insert."
  923.  
  924.    The modified input line can now be accepted (<Enter> key) and executed.
  925. Afterward, we will be in the \work\janice\memos\text directory and the
  926. history buffer will look like this:
  927.  
  928.                         History Buffer
  929.                  ------------------------------ <--- Top of buffer
  930.                  | cd \work\jasper\memos\text |
  931.                  | dir *.*                    |
  932.                  | copy *.txt a:              |
  933.                  | dir a:                     |
  934.                  | cd \work\janice\memos\text |
  935.          CBL --->|                            |
  936.                  ------------------------------ <--- Bottom of buffer
  937.  
  938.    Now we wish to copy all of the .TXT files to the A: drive.  Since a line
  939. already exists in the history buffer to perform this operation, there is no
  940. need for us to type it on the command line; we'll let ANARKEY do it for us.
  941.  
  942.    This time, we don't want to retrieve the CD command we just entered
  943. before getting the desired COPY line, so we enter:
  944.  
  945.                 C>co_
  946.  
  947.    And invoke the Find-History-Buffer-Match-and-Edit function (<F5> or
  948. <Ctrl-K>).  ANARKEY uses the characters from the start of the input line up
  949. until the cursor (but not including the character under the cursor) in its
  950. search for a matching line.  In this case, ANARKEY uses the two characters
  951. "co" to find a matching line.  Subsequently, it retrieves the desired "copy"
  952. command.  Thus, when the search-and-retrieve operation is complete, the
  953. input line and history buffer are:
  954.  
  955.                 C>copy *.txt a:
  956.                     -
  957.  
  958.                         History Buffer
  959.                  ------------------------------ <--- Top of buffer
  960.                  | cd \work\jasper\memos\text |
  961.                  | dir *.*                    |
  962.          CBL --->| copy *.txt a:              |
  963.                  | dir a:                     |
  964.                  | cd \work\janice\memos\text |
  965.                  |                            |
  966.                  ------------------------------ <--- Bottom of buffer
  967.  
  968.    Since this is the exact command we wish to execute, no editing is
  969. required prior to acceptance.  Following acceptance (<Enter>), the history
  970. buffer will contain:
  971.  
  972.                         History Buffer
  973.                  ------------------------------ <--- Top of buffer
  974.                  | cd \work\jasper\memos\text |
  975.                  | dir *.*                    |
  976.                  | dir a:                     |
  977.                  | cd \work\janice\memos\text |
  978.                  | copy *.txt a:              |
  979.          CBL --->|                            |
  980.                  ------------------------------ <--- Bottom of buffer
  981.  
  982.    Take a close look at the current history buffer.  Notice that the
  983. retrieved line has not only been entered at the bottom of the buffer, but
  984. that it has been "moved" from its previous location between the two "dir"
  985. commands.  This occurred because the retrieved line was accepted unmodified.
  986.  
  987.    Now we want a list of all the files we've copied to the A: drive.  The
  988. "dir a:" input line stored in the history buffer is exactly what we want.
  989. Rather than type it ourselves, simply enter the single character 'D' so the
  990. input line is:
  991.  
  992.                 C>d_
  993.  
  994.    But this time invoke the Find-History-Buffer-Match-and-Execute function
  995. (<F6> or <Ctrl-L>).  ANARKEY will retrieve the first matching line in the
  996. buffer (which just happens to be the "dir a:" command we desire) and
  997. immediately pass it to the command processor for execution.  This saves us
  998. from entering the extra keystroke required (i.e. <Enter>) if we were to
  999. accept the line ourselves.  Once again, since the retrieved line was
  1000. immediately executed, it is moved to the end of the history buffer.  Thus,
  1001. the history buffer at the end of our example would look this:
  1002.  
  1003.                         History Buffer
  1004.                  ------------------------------ <--- Top of buffer
  1005.                  | cd \work\jasper\memos\text |
  1006.                  | dir *.*                    |
  1007.                  | cd \work\janice\memos\text |
  1008.                  | copy *.txt a:              |
  1009.                  | dir a:                     |
  1010.          CBL --->|                            |
  1011.                  ------------------------------ <--- Bottom of buffer
  1012.  
  1013.    The Find-Match-and-Execute function is powerful, but potentially
  1014. dangerous.  In the above example, if a "del *.exe" command happened to be
  1015. stored in the history buffer between the "dir a:" command and the CBL, the
  1016. DEL command would have been retrieved and executed before anything could be
  1017. done about it.  This may cause irreparable damage.  To prevent this from
  1018. ever happening, you could always use the Find-Match-and-Edit function and
  1019. accept the line only after you've ascertained that the retrieved line is the
  1020. actual command(s) you wish to execute.  On the other hand, for users who
  1021. "know what they are doing," the Find-Match-and-Execute function provides the
  1022. ability to reduce keystrokes even further and really soar.
  1023.  
  1024.  
  1025. Retrieving a Group of Lines
  1026. ---------------------------
  1027.  
  1028.    Often, a group of consecutive command lines need to be re-executed.  For
  1029. instance, a programmer may edit a source file, compile and link it, test the
  1030. resulting program for bugs, and then begin the cycle again to correct any
  1031. problems.  This cycle may result in a history buffer with the following
  1032. contents:
  1033.  
  1034.                         History Buffer
  1035.                  ------------------------------ <--- Top of buffer
  1036.                  | edit file                  |
  1037.                  | compile file               |
  1038.                  | link file                  |
  1039.                  | file                       |
  1040.          CBL --->|                            |
  1041.                  ------------------------------ <--- Bottom of buffer
  1042.  
  1043.   It would be nice to be able to move the CBL pointer to the top of this
  1044. cycle and then have a simple method for retrieving each of the succeeding
  1045. lines.  ANARKEY provides such a method.
  1046.  
  1047.    <PgDn>             -- Restore CBL
  1048.         As previously described, when a new command prompt appears, the CBL
  1049.         is initialized to point at the end of the history buffer.  In
  1050.         addition to this, the position of the CBL pointer at the time of
  1051.         line acceptance is also saved.  The CBL can be restored to this
  1052.         saved position by invoking the Restore-CBL function (<PgDn>).
  1053.  
  1054.         Given the above history buffer contents, assume the CBL was moved to
  1055.         the top line.  This can be done using either of the retrieval
  1056.         methods.  The situation would then be:
  1057.  
  1058.                         History Buffer
  1059.                  ------------------------------ <--- Top of buffer
  1060.          CBL --->| edit file                  |
  1061.                  | compile file               |
  1062.                  | link file                  |
  1063.                  | file                       |
  1064.                  |                            |
  1065.                  ------------------------------ <--- Bottom of buffer
  1066.  
  1067.         If this line is then accepted (<Enter> key), several things would
  1068.         occur.  First, the retrieved line (assuming it was accepted
  1069.         unmodified) would be moved to the end of the buffer.  Second,
  1070.         because the line was moved, the CBL would be the line AFTER the
  1071.         retrieved line (i.e. the compile line).  Third, as part of the
  1072.         line-acceptance operation, the CBL position would be saved.
  1073.         Following this, the retrieved line would be executed.  When the
  1074.         command prompt was next displayed, the CBL would be moved to the end
  1075.         of the buffer (but the saved position would still be maintained).
  1076.         This final state is depicted in the following diagram:
  1077.  
  1078.                         History Buffer
  1079.                  ------------------------------ <--- Top of buffer
  1080.    saved CBL --->| compile file               |
  1081.                  | link file                  |
  1082.                  | file                       |
  1083.                  | edit file                  |
  1084.          CBL --->|                            |
  1085.                  ------------------------------ <--- Bottom of buffer
  1086.  
  1087.         Now to retrieve the next line in the cycle, simply invoke the
  1088.         Restore-CBL function (<PgDn> key).  Doing so will move the CBL
  1089.         pointer from its position at the end of the buffer to the saved
  1090.         position.  The history buffer would now look like this:
  1091.  
  1092.                         History Buffer
  1093.                  ------------------------------ <--- Top of buffer
  1094.          CBL --->| compile file               |
  1095.                  | link file                  |
  1096.                  | file                       |
  1097.                  | edit file                  |
  1098.                  |                            |
  1099.                  ------------------------------ <--- Bottom of buffer
  1100.  
  1101.         The CBL would be retrieved from the buffer and displayed on the
  1102.         input line.  Accepting the line (<Enter>) will repeat the process.
  1103.         All the lines in the cycle may be retrieved and executed this way.
  1104.  
  1105.         The Restore-CBL function will work even if the move-line operation
  1106.         is repressed (-F installation option) or the retrieved line is
  1107.         edited prior to acceptance.  ANARKEY is smart enough to know whether
  1108.         or not the retrieved line has been moved and acts accordingly.
  1109.  
  1110.         Restore-CBL can be executed once per command line.  Subsequent
  1111.         invocations will act as a Retrieve-Next-History-Buffer-Line function
  1112.         (<Down Arrow>).
  1113.  
  1114.  
  1115. Miscellaneous History Buffer Functions
  1116. --------------------------------------
  1117.  
  1118.    Additional functions allow you to write the contents of the buffer to a
  1119. disk file, remove lines from the buffer and clear the buffer.
  1120.  
  1121.    <Ctrl-W>           -- Write History Buffer to Disk
  1122.         The history buffer contents are written to the ANARKEY.LOG disk
  1123.         file.  The file is located in the root directory of the current
  1124.         drive.  If the file cannot be written because the disk is full,
  1125.         ANARKEY will beep.
  1126.  
  1127.         ANARKEY.LOG is a standard ASCII text file which may be edited using
  1128.         most editors and word processors.  It may be reloaded into the
  1129.         history buffer by LOAD, the ANARKEY Loader.  Refer to the "LOAD User
  1130.         Manual" for instructions on using LOAD.
  1131.  
  1132.    <Ctrl-Z>           -- Remove CBL from Buffer
  1133.         If the CBL pointer is pointing at a non-empty line, i.e. the CBL
  1134.         pointer is not at the end of the history buffer, the line pointed at
  1135.         by the CBL pointer is removed from the buffer.  All lines stored
  1136.         after it in the buffer are shifted up.  The result of this shift is
  1137.         that the CBL pointer will then point at the line stored after the
  1138.         removed line.  This operation is depicted in the following two
  1139.         diagrams.  The first diagram shows the history buffer and CBL
  1140.         pointer before removing the CBL.
  1141.  
  1142.                              History Buffer
  1143.                       | rem Line before removed line |
  1144.               CBL --->| rem We'll remove this line   |
  1145.                       | rem Line after removed line  |
  1146.  
  1147.         Here are the contents of the buffer and the position of the CBL
  1148.         pointer after removing the CBL:
  1149.  
  1150.                              History Buffer
  1151.                       | rem Line before removed line |
  1152.               CBL --->| rem Line after removed line  |
  1153.                       |                              |
  1154.  
  1155.         After the CBL has been removed and the buffer lines shifted, the new
  1156.         CBL is displayed on the input line, replacing the previously
  1157.         displayed line.  The removal function may be repeated several times
  1158.         to delete a group of consecutive lines from the buffer.  If the last
  1159.         non-empty line in the history buffer is removed, the CBL pointer
  1160.         will be at the end of the buffer and an empty line will be displayed
  1161.         on the input line.
  1162.  
  1163.    <Ctrl-X>           -- Clear History Buffer
  1164.         Invoking this function will clear all lines from the history buffer.
  1165.  
  1166.         Obviously, this function is potentially dangerous, so beware.  If
  1167.         you are afraid of accidentally invoking this function, use ANARKED,
  1168.         the ANARKEY Keystroke Editor, to reassign its keystroke invocation
  1169.         to something you are less likely to enter or remove its keystroke
  1170.         invocation entirely, thereby making it impossible to execute.
  1171.         ANARKED operation is explained in the "ANARKED User Manual."
  1172.  
  1173.    The history buffer functions, and, in particular, the character matching
  1174. functions, give ANARKEY its main source of strength.  Take the time to
  1175. become familiar and comfortable with them and chances are you will never
  1176. want to use your computer without them.
  1177.  
  1178.  
  1179.  
  1180.                                AKA Functions
  1181.                                -------------
  1182.  
  1183.    Some commands are executed with great regularity.  The history buffer
  1184. retrieval functions are extremely useful in reducing the number of times you
  1185. actually have to type in such lines.  However, ANARKEY provides yet another
  1186. powerful feature called AKAs to ease the strain on your fingertips.
  1187.  
  1188.  
  1189. Simple Text Substitution
  1190. ------------------------
  1191.  
  1192.    An AKA (pronounced A-K-A) provides a text substitution capability to
  1193. ANARKEY.  AKAs are analogous to aliases and synonyms found in other
  1194. command-line editors.  AKA is an acronym for either "Also-Known-As" or
  1195. "AnarKey Alias."  Once again, ANARKEY offers you a choice.
  1196.  
  1197.    By default, AKAs are not an integral part of ANARKEY; they must be
  1198. enabled at installation time by the -A option (Allocate Space for AKA
  1199. Definitions).  If AKAs are not enabled, none of the AKA-processing code
  1200. remains resident.  This is an obvious advantage to users who do not use
  1201. AKAs; they do not have to pay a memory penalty for a feature they will never
  1202. exercise.
  1203.  
  1204.    Refer to the section "Installation Options, Allocate Space for AKA
  1205. Definitions" for information on enabling the AKA features.  The remainder of
  1206. this section will describe how to use AKAs once they are enabled.
  1207.  
  1208.    An AKA is made up of two parts: an AKA word and a substitution string.
  1209. When the word is entered on the input line as a command, ANARKEY will
  1210. replace the AKA word with its substitution string.  AKA words are not case
  1211. sensitive.  As an example, an AKA could be:
  1212.  
  1213.                         dos     cd \dos
  1214.                         ---     -------
  1215.                          |         |
  1216.             AKA word <----         ----> Substitution string
  1217.  
  1218.    If this was a "defined" AKA, meaning ANARKEY knew about it, then every
  1219. time "dos" was entered as a command on an input line, ANARKEY would replace
  1220. it with "cd \dos."
  1221.  
  1222.                 C>dos           <---ANARKEY will replace with "cd \dos"
  1223.  
  1224.    This replacement is performed after the line is accepted (<Enter>), but
  1225. before it is passed to the command processor for execution.  Because the
  1226. replacement string is never displayed onscreen, the substitution operation
  1227. is transparent to the user.  For example, the above AKA may result in the
  1228. following screen display:
  1229.  
  1230.                         >cd
  1231.                         C:\EDITOR\BACKUP
  1232.  
  1233.                         >dos            <---replaced with "cd \dos"
  1234.  
  1235.                         >cd
  1236.                         C:\DOS
  1237.  
  1238.    It is important to understand that the AKA word must be a "command" on
  1239. the input line.  In other words, it must be the first word in the "command
  1240. line."  (Because ANARKEY supports multiple commands per line, it must
  1241. differentiate between "command line" and "input line."  There may be more
  1242. than one "command line" in the "input line."  Multiple commands per line are
  1243. discussed in detail later in this manual.)
  1244.  
  1245.    Again, given the above AKA, the following input line would not replace
  1246. "dos" with its substitution string:
  1247.  
  1248.                         >echo dos
  1249.  
  1250.    In the example, "echo" is the command and "dos" is a "parameter" or
  1251. "argument" to the command.  Since "dos" is not a command on this line, it
  1252. will not get replaced with its substitution string.
  1253.  
  1254.  
  1255. Viewing AKAs
  1256. ------------
  1257.  
  1258.    The list of defined AKAs may be viewed at any time by invoking the View-
  1259. AKAs function.
  1260.  
  1261.    <Alt-F4>           -- View AKAs
  1262.         All defined AKAs are displayed onscreen.  After a screen's worth of
  1263.         AKAs have been displayed, output will pause.  Pressing any key will
  1264.         display another screen of AKA definitions.
  1265.  
  1266.         At the end of the AKA list, ANARKEY will display the remaining space
  1267.         available to store further AKA definitions.
  1268.  
  1269.         When AKAs are not enabled (i.e. no space allocated for AKA
  1270.         definitions via -A installation option), this keystroke invocation
  1271.         has no effect.
  1272.  
  1273.  
  1274. Defining an AKA
  1275. ---------------
  1276.  
  1277.    An AKA must be "defined" before it can be used.  ANARKEY provides two
  1278. methods to define AKAs.  The definition may be entered on the input line or
  1279. it can be read from a disk file using LOAD, the ANARKEY Loader.  The
  1280. definition syntax is identical for both methods.  This section will present
  1281. examples of definitions as if they were entered on the command line.  Refer
  1282. to the "LOAD User Manual" for instructions on how to read AKA definitions
  1283. from a disk file.
  1284.  
  1285.    When defining an AKA, the very first character in the command must be a
  1286. colon.  The characters following the colon, up until the first space or tab
  1287. character, comprise the AKA word.  All remaining characters on the line make
  1288. up the substitution string.
  1289.  
  1290.    Example AKA definitions are:
  1291.  
  1292.         >:d             dir
  1293.         >:dos           cd \dos
  1294.         >:help          type anarkey.sum
  1295.         >:format        echo You do not have access to this command!
  1296.  
  1297.    AKA words and substitution strings can be of any length as long as their
  1298. total length does not exceed 255 characters.  In other words, the AKA
  1299. definition must fit on the input line.
  1300.  
  1301.    Any character may be used in an AKA word except a space or tab character,
  1302. since these characters indicate the end of the word.  Control and graphic
  1303. characters are valid in an AKA word.
  1304.  
  1305.    The amount of space allocated to store AKA definitions is specified at
  1306. ANARKEY installation time (-A option).  (This option also enables AKAs and
  1307. keeps the AKA-processing code resident.)  If there is not enough space left
  1308. to store a definition, ANARKEY will beep.  When this occurs, there are
  1309. several roads you may choose.  One choice would be to make room in the AKA
  1310. "buffer" by undefining one or more AKAs (undefining AKAs is explained
  1311. below).  Another method is to retrieve the AKA definition from the history
  1312. buffer and edit it so that it will fit in the remaining AKA space (i.e. make
  1313. it shorter). If none of these routes is feasible, you can reboot your
  1314. system, but this time allocate more space for AKA definitions.
  1315.  
  1316.    AKA substitution strings may contain multiple commands.  Multiple
  1317. commands per line are discussed in detail a little later, but, basically,
  1318. each command must be separated by a semi-colon (;).  Some example AKA
  1319. definitions consisting of multiple commands are:
  1320.  
  1321.         >:edit          cd\wordproc ; editor ; cd\homedir
  1322.         >:editaka       editor anarkey.aka;load anarkey.aka
  1323.  
  1324.    In the first example, if you were to enter the command "edit," ANARKEY
  1325. would replace it with the substitution string which would execute the three
  1326. commands comprising it.
  1327.  
  1328.    If an AKA definition is made that contains an AKA word already being
  1329. used, the new definition will replace the existing one.  For example, given
  1330. the following AKA definitions, the second definition will replace the first:
  1331.  
  1332.         >:d             dir *.*
  1333.         >:d             del *.com
  1334.  
  1335.    AKAs may not be nested.  In other words, a substitution string may not
  1336. contain another AKA word.  The following example shows an invalid AKA
  1337. definition:
  1338.  
  1339.         >:r             rem
  1340.         >:ignore        r
  1341.  
  1342.    In the above example, "r" is first defined as an AKA word whose
  1343. substitution string is "rem."  "R" is also specified as the replacement
  1344. string for "ignore."  If "ignore" was entered as a command, ANARKEY would
  1345. replace it with its substitution string "r."  It would not continue and
  1346. replace "r" with "rem."
  1347.  
  1348.    When defining an AKA, ANARKEY performs a length check on each command in
  1349. the substitution string.  If any command is longer than 127 characters,
  1350. ANARKEY will refuse to accept the definition.  It will beep and place the
  1351. cursor under the first character beyond the 127-character limit.  Further
  1352. editing of the command will be required before the definition can be
  1353. accepted.
  1354.  
  1355.    A length check is always performed following input line acceptance
  1356. (<Enter> key).  Length checks may optionally occur by invoking the Check-
  1357. Line-Lengths function (<F2>), documented in the "Multiple Commands Per Line"
  1358. section.
  1359.  
  1360.  
  1361. Undefining an AKA
  1362. -----------------
  1363.  
  1364.    A single AKA may be undefined by entering a colon as the first character
  1365. in the command followed by the name of the AKA.  Do not specify a
  1366. substitution string.  When the line is accepted, the AKA will be undefined.
  1367. For example, the following commands undefine AKAs:
  1368.  
  1369.         >:edit
  1370.         >:d
  1371.  
  1372.    ANARKEY also provides a way to undefine all existing AKAs in a single
  1373. swoop.
  1374.  
  1375.    <Alt-X>            -- Undefine All AKAs
  1376.         Undefine all existing AKAs.  All the allocated AKA space is freed
  1377.         for new AKA definitions.
  1378.  
  1379.  
  1380. Parameter Fields
  1381. ----------------
  1382.  
  1383.    ANARKEY AKAs support more than just simple text substitution.
  1384. Substitution strings may contain "parameter" fields.  These fields are
  1385. similar to the parameter fields in a DOS batch file.  They are specified by
  1386. a leading percent sign (%) and followed by a single-digit number from 1 to
  1387. 9, as in %1, %5 and %9.  (%0 is not supported.)
  1388.  
  1389.    When specified in an AKA substitution string, parameters fields are
  1390. replaced with the corresponding argument from the command line.  For
  1391. example, %1 is replaced with the first argument to the AKA, %2 with the
  1392. second, and so on, up through %9.
  1393.  
  1394.         >:example       echo %1 %2 %3 %4 %5 %6 %7 %8 %9
  1395.         >example one two three four five six seven eight nine
  1396.  
  1397.    In this example, the %1 parameter in the AKA substitution string would be
  1398. replaced with the AKA argument "one,"  %2 with the second argument ("two")
  1399. and so on.  The resulting line passed to the command processor would be:
  1400.  
  1401.         echo one two three four five six seven eight nine
  1402.  
  1403.    The resulting line may never exceed the maximum input line length of 255
  1404. characters.  Also, each command in the line may not go beyond the requested
  1405. maximum length.  In the case of the DOS command processor, this is 127
  1406. characters.  If either of these events occur, ANARKEY will immediately stop
  1407. replacing parameter fields and pass the input line in its current form to
  1408. the command processer.
  1409.  
  1410.    If the substitution string contains a parameter field, but the command
  1411. line does not include a corresponding argument, the parameter field is
  1412. simply removed from the expanded line.  In other words, the parameter field
  1413. is replaced with nothing.  This is depicted in the following AKA definition
  1414. and command:
  1415.  
  1416.         >:pack          echo %1%3%2
  1417.         >pack a b                       <--- expands to "echo ab"
  1418.  
  1419.    Notice that the %1 parameter was replaced with 'a,' 'b' is the second
  1420. argument so it replaces the %2 parameter, and, since there is no third
  1421. argument to replace the %3 parameter, it is "expanded" to nothing.  The
  1422. resulting line passed to the command processor is "echo ab."
  1423.  
  1424.    If there are more AKA arguments than there are parameter fields, the
  1425. extra arguments are ignored.  As an example:
  1426.  
  1427.         >:one-arg       echo %1
  1428.         >one-arg a b c                  <--- expands to "echo a"
  1429.  
  1430.    The 'b' and 'c' arguments are not part of the resulting line.
  1431.  
  1432.    If the AKA substitution string does not contain any parameter fields,
  1433. arguments on the command line are appended to the end of the replacement
  1434. string.  For example:
  1435.  
  1436.         >:d             dir
  1437.         >d *.com                        <--- expands to "dir *.com"
  1438.  
  1439.         >:no-args       dir;echo
  1440.         >no-args *.com                  <--- expands to "dir;echo *.com"
  1441.  
  1442.    Use of parameter fields in substitution strings can provide fast batch
  1443. files.  This is due to the fact that the DOS command processor will accept
  1444. many of the commands normally executed in a batch file on the command line.
  1445. For example, you could enter "pause" on the command line and the result
  1446. would be the familiar "Hit any key to continue . . ." message.  This ability
  1447. can be used to create very powerful and quick AKAs.  As an example, consider
  1448. the following AKA definition:
  1449.  
  1450.         :mcopy  for %f in (%2 %3 %4 %5 %6 %7 %8 %9) do copy %1
  1451.  
  1452.    This AKA will copy up to eight file specifications (the %2 through %9
  1453. parameter fields) to a destination (the %1 parameter field).  For example:
  1454.  
  1455.         >mcopy a: *.com *.exe *.doc anarkey.sum
  1456.  
  1457.    Will expand into the commands:
  1458.  
  1459.         copy *.com a:
  1460.         copy *.exe a:
  1461.         copy *.doc a:
  1462.         copy anarkey.sum a:
  1463.  
  1464.    All in one command!
  1465.  
  1466.  
  1467.  
  1468.                         File Name Completion Functions
  1469.                         ------------------------------
  1470.  
  1471.    As an additional feature to make the entering of commands as quick and
  1472. easy as possible, ANARKEY provides functions which will complete file names,
  1473. including directory and program names.
  1474.  
  1475.    <F7>               -- Complete Directory Name
  1476.    <Ctrl-D>
  1477.         When this function is invoked, ANARKEY extracts the characters
  1478.         starting at the immediate left of the current cursor position and
  1479.         proceeding left (toward the start of the line) until either a space
  1480.         or the start of the line is reached.  It uses these characters to
  1481.         perform its search-and-compare operation, looking for an existing
  1482.         directory with which to complete the name.  The search-and-compare
  1483.         operation is not case-sensitive.
  1484.  
  1485.         If a match is found, it is inserted in the input line at the current
  1486.         cursor position.  After display, the cursor is moved to the end of
  1487.         the completed name.
  1488.  
  1489.         The matching directory is displayed in upper or lowercase depending
  1490.         upon the current state of the CapsLock key.  If CapsLock is active,
  1491.         the directory is displayed in uppercase; if inactive, the name will
  1492.         be in lowercase.  Should no match be found, ANARKEY will respond
  1493.         with a beep.
  1494.  
  1495.         This function may be invoked repeatedly.  Each successive invocation
  1496.         will find any additional matching directory names.  For example,
  1497.         assume there are three directories that begin with the letter "M" in
  1498.         the current directory.  If you enter the character "M" and invoke
  1499.         the Complete-Directory-Name function, ANARKEY will find one of the
  1500.         directories and enter its name on the input line.  If this is not
  1501.         the directory you desire, invoking the function a second time will
  1502.         cause another of the "M"-directories to replace the original match.
  1503.         Another invocation will display the remaining matching directory.
  1504.         Since there are no more matching directories, invoking the function
  1505.         a fourth time will cause the last matched directory to be removed
  1506.         from the input line and ANARKEY will beep.  You may begin the cycle
  1507.         all over again by invoking the function a fifth time, which would
  1508.         once again display the first matching "M"-directory.
  1509.  
  1510.         It is not necessary to enter any characters in order for ANARKEY to
  1511.         perform a directory-completion operation.  Simply invoke the
  1512.         function with the cursor located at the start of the line or to the
  1513.         right of at least one space, slash (/) or backslash (\) character
  1514.         and ANARKEY will cycle through all the existing directory names.
  1515.  
  1516.         Directories in locations other than the current directory or on a
  1517.         drive other than the current drive may also be completed.  To do so,
  1518.         specify a path specification to the desired directory.  Here is an
  1519.         extended example:
  1520.  
  1521.         Say you wish to enter the following command:
  1522.  
  1523.                 C>cd c:\dos\commands
  1524.  
  1525.         Enter the following characters:
  1526.  
  1527.                 C>cd c:\_
  1528.  
  1529.         The underscore represents the position of the cursor.  Invoke the
  1530.         Complete-Directory-Name function.  ANARKEY will begin cycling
  1531.         through all directories in the root of the C: drive.  Eventually, it
  1532.         will display the DOS directory.  If you had added a "d" to the above
  1533.         input line, ANARKEY would have cycled through all directories
  1534.         starting with a "D"; add a "DO" and the cycle would be through
  1535.         directories whose first two characters were "DO."
  1536.  
  1537.         The current input line is now:
  1538.  
  1539.                 C>cd c:\dos_
  1540.  
  1541.         The underscore represents the cursor position at the end of the
  1542.         completed directory name.  Add a backslash character.
  1543.  
  1544.                 C>cd c:\dos\_
  1545.  
  1546.         This time, rather than cycle through all the directories, let's
  1547.         retrieve only those directories whose first three characters are
  1548.         "com" (there may be only one).  Enter the three characters onto the
  1549.         input line, like so:
  1550.  
  1551.                 C>cd c:\dos\com_
  1552.  
  1553.         Invoke the Complete-Directory-Name function again.  ANARKEY will
  1554.         begin cycling through the directories whose first three characters
  1555.         are "com" located in the DOS directory on the C: drive.  Repeat
  1556.         invoking the function as many times as is necessary until the
  1557.         desired directory is displayed, in this case "commands."
  1558.  
  1559.                 C>cd c:\dos\commands_
  1560.  
  1561.         And you've got it.  This function can be especially useful when you
  1562.         are working on a new machine whose directory structure you are
  1563.         unfamiliar with.
  1564.  
  1565.         NOTE:
  1566.         Many people change the DOS switch character from a slash (/)
  1567.         character to a dash (-) or something else.  Doing so frees the slash
  1568.         character to be used as a path separator in a directory
  1569.         specification, as in:
  1570.  
  1571.                 C>cd c:/dos/commands
  1572.  
  1573.         ANARKEY recognizes both backslashes (\) and slashes as path
  1574.         separator characters in directory specifications.
  1575.  
  1576.    <F8>               -- Complete File or Program Name
  1577.    <Ctrl-F>
  1578.         The Complete-File-or-Program-Name function is similar to the
  1579.         Complete-Directory-Name function.  The main difference, as its name
  1580.         implies, is that instead of completing directory names, the
  1581.         Complete-File-or-Program-Name function completes program and file
  1582.         names.
  1583.  
  1584.         In ANARKEY, a "program" is defined as the first specification in a
  1585.         command.  A program specification may contain a drive and/or a
  1586.         directory path.  A program name must have a file extension of BAT,
  1587.         COM or EXE.  "Files" are all specifications which are passed to
  1588.         programs in an argument list.  In other words, all specifications in
  1589.         a command other than the program name, are file names.  File
  1590.         specifications may also contain a drive and/or directory path and
  1591.         may have any file extension.
  1592.  
  1593.         All of the information presented in the Complete-Directory-Name
  1594.         function is applicable to the Complete-File-or-Program-Name
  1595.         function, including the non-case-sensitive search, the effect of the
  1596.         CapsLock key, the repeatability of the function and the method of
  1597.         character extraction upon which the search is performed.  That
  1598.         information will not be repeated here.  Please refer to the
  1599.         explanation of the Complete-Directory-Name function for background
  1600.         information relevant to the Complete-File-or-Program-Name function.
  1601.         This section will deal with those details which are specific to the
  1602.         Complete-File-or-Program-Name function.
  1603.  
  1604.         When the Complete-File-or-Program-Name function is invoked, ANARKEY
  1605.         determines whether it is searching for a program or a file name
  1606.         based upon the above definitions.  Be aware of the fact that since
  1607.         ANARKEY supports multiple commands per line (explained in the next
  1608.         section), there may be multiple program names on a single input
  1609.         line.  ANARKEY will automatically determine whether it needs to
  1610.         complete a program or a file name.
  1611.  
  1612.         If a "program name" is being completed, ANARKEY will search the
  1613.         appropriate directory for a matching file specification which has
  1614.         the extension BAT, COM or EXE. If a match is found, the program name
  1615.         is entered into the input line.  The program's extension is not
  1616.         displayed, just as you would not enter the extension were you to
  1617.         type the program name yourself.  Other possible situations are
  1618.         handled in the same manner as in the Complete-Directory-Name
  1619.         function.
  1620.  
  1621.         If a "file name" completion is called for, all the files in the
  1622.         appropriate directory are retrieved, one after another, in the same
  1623.         cyclical operation as that used for directory and program names.
  1624.         The complete file name, including extension, is entered onto the
  1625.         input line.
  1626.  
  1627.         In the case of file names, many files exist which are rarely entered
  1628.         as arguments to programs.  For example, files with the extensions
  1629.         EXE, OBJ, and SYS are almost never part of a program's argument
  1630.         list.  Most of the time, a user would simply cycle past these file
  1631.         names as they popped up during the completion operation.  To save
  1632.         the user from this unnecessary cycling, files with certain
  1633.         extentions are ignored by ANARKEY when it is searching for a
  1634.         matching file name.  The ignored extensions are:
  1635.  
  1636.                 .$$$    .BAK    .BIN    .COM    .EXE    .HEX
  1637.                 .LIB    .OBJ    .OVR    .SYS    .TMP
  1638.  
  1639.         Additional file extensions may be added to the ignored-extension
  1640.         list during program installation (the -X option).  Also, the
  1641.         extensions listed above may be cleared so that ANARKEY will not
  1642.         ignore file names with those extensions.  Refer to the section
  1643.         "Installation Options, Exclude File Extension" for details.
  1644.  
  1645.         As a simple example, assume you are in a directory which contains a
  1646.         single file called TEST.EXE.  At the start of a new command, you
  1647.         invoke the Complete-File-or-Program-Name function.  ANARKEY would
  1648.         find a program-name match with TEST.EXE and enter it on the input
  1649.         line, like so:
  1650.  
  1651.                 C>test_
  1652.  
  1653.         The cursor would be sitting immediately after the completed program
  1654.         name.  Add a space to the line.
  1655.  
  1656.                 C>test _
  1657.  
  1658.         Invoking the Complete-File-or-Program-Name function now would get
  1659.         only a beep as a response.  This is because ANARKEY is now searching
  1660.         for a file-name match and the only file it finds is TEST.EXE whose
  1661.         .EXE extension is a member of the ignored-extension list.  If you
  1662.         truly wanted to include the file TEST.EXE in the program's argument
  1663.         list, you would have to enter it yourself.
  1664.  
  1665.         Alternatively, let's say you had installed ANARKEY so that it would
  1666.         not use the default ignored-extension list.  In that case, given the
  1667.         above input line, ANARKEY WOULD match the TEST.EXE file.  The input
  1668.         line would then be:
  1669.  
  1670.                 C>test test.exe_
  1671.  
  1672.         Of course, this example shows the most basic use of the Complete-
  1673.         File-or-Program-Name function.  Program and file names may include a
  1674.         drive and/or path specifier, just as their directory-name
  1675.         counterpart.  When used in conjunction with the Complete-Directory-
  1676.         Name function, entire commands can be entered with only a few
  1677.         keystrokes.
  1678.  
  1679.  
  1680.  
  1681.                     Entering Multiple Commands per Line
  1682.                     -----------------------------------
  1683.  
  1684.    The following ANARKEY functions are documented in this section:
  1685.  
  1686.    <F2>               -- Check Command Lengths
  1687.  
  1688.    <F10>              -- Repress Multiple Commands per Line
  1689.    <Ctrl-R>
  1690.  
  1691.    In DOS, the terms "line," "command" and "command line" all generally
  1692. refer to the same thing.  This is because DOS supports only a single command
  1693. on each line.  ANARKEY supports multiple commands per line and thus must
  1694. make a distinction between "commands" and "lines."
  1695.  
  1696.    Support of multiple commands per line requires a method of specifying the
  1697. end of one command and the start of the next.  ANARKEY interprets the
  1698. semicolon character (;) as just such a command separator.  A semicolon must
  1699. lie between each of the commands on the input line.  Spaces may be on either
  1700. side of the semicolon, but they are not required.
  1701.  
  1702.    For example, to enter two commands on a single input line, enter the
  1703. first command, follow it with a semicolon, and then enter the next command.
  1704. This sequence may be followed for as many commands as will fit on the input
  1705. line.  The number of commands allowed on a single input line is restricted
  1706. only by the input line's maximum length of 255 characters.
  1707.  
  1708.    Some examples of input lines which contain multiple commands are:
  1709.  
  1710.         C>dir a: ; pause ; del a:*.* ; copy *.* a: ; dir a:
  1711.         C>cd \play;game;cd \work
  1712.         C>edlin prog.c;cl -c prog.c
  1713.  
  1714.    Some programs require that a semicolon occasionally be passed to them in
  1715. the program's argument list.  There are three methods to include a semicolon
  1716. in a command:
  1717.  
  1718.         1) Enter two consecutive semicolons on the input line.
  1719.         2) Make the semicolon the very last character on the line.
  1720.         3) Repress semicolon/command separator interpretation for the line.
  1721.  
  1722.    Note: Many environment varibles use semicolons as part of their value.
  1723. The PATH variable is one example.  Rather than require the entering of
  1724. consecutive semicolons, ANARKEY will not translate semicolons when they are
  1725. contained within a SET, PATH or PROMPT command.  This topic is discussed in
  1726. detail in the "Editing Environment Variables" section.
  1727.  
  1728.    As an example, the LINK program interprets a semicolon character as
  1729. designating the end of the argument list.  Some valid input lines which
  1730. invoke the LINK program are:
  1731.  
  1732.         C>link prog;
  1733.         C>link prog;;
  1734.         C>link prog;;;exe2bin prog prog.com ; del prog.exe
  1735.  
  1736.    In the first example, the semicolon is the last character on the input
  1737. line, therefore it is passed as part of the command.
  1738.  
  1739.    The second example shows a situation where the first semicolon is not at
  1740. the end of the input line, but it is followed immediately by another
  1741. semicolon.  In this case, the consecutive semicolons are converted to a
  1742. single semicolon character and passed to the command processor.
  1743.  
  1744.    Notice that the first two examples result in identical commands.  They
  1745. are shown to illustrate the fact that, although it is not always necessary,
  1746. if you consistently enter consecutive semicolons whenever it is desired to
  1747. pass a semicolon as part of a command, you will never get burned.
  1748.  
  1749.    The third example above displays how semicolons may be used as both
  1750. command separators and part of a command.  The first two semicolons are
  1751. converted to a single semicolon and entered as part of the LINK command. The
  1752. third and fourth semicolons are interpreted as command separators.  The
  1753. third example will be dissected into the following three commands (the
  1754. quotation marks are included only to illustrate the blank characters in each
  1755. command; they are not actually part of the commands):
  1756.  
  1757.         "link prog;"
  1758.         "exe2bin prog prog.com "
  1759.         " del prog.exe"
  1760.  
  1761.    Be aware that semicolons used to separate commands may have blank
  1762. characters before and/or after them.  However, to pass a semicolon as part
  1763. of a command, the semicolons must be consecutive with no space between them.
  1764. Thus, the above example may have been entered as:
  1765.  
  1766.         C>link prog;; ; exe2bin ...
  1767.  
  1768. But not as:
  1769.  
  1770.         C>link prog; ; ; exe2bin ...
  1771.  
  1772.    Another method to disable semicolon interpretation is to invoke the
  1773. Repress-Multiple-Commands-per-Line function.  Pressing the <F10> or <Ctrl-R>
  1774. key will repress semicolon interpretation for the current input line.  The
  1775. entire line will be passed to the command processor unmodified.  This
  1776. function performs a temporary repression for the current input line only;
  1777. the next input line will support semicolon translation unless this function
  1778. is invoked again.
  1779.  
  1780.    With ANARKEY installed, input lines may be up to 255 characters in
  1781. length.  Each input line may contain several commands.  Individual commands
  1782. consist of no more than 127 characters.
  1783.  
  1784.    This 127-character limit is imposed by the DOS command processor,
  1785. COMMAND.COM.  If you are using some other command processor, the length
  1786. limit may differ.  ANARKEY enforces and supports the length limit of all
  1787. third-party command processors, provided the command processor uses the same
  1788. method of line input that COMMAND.COM uses.
  1789.  
  1790.    ANARKEY will not let you enter an input line that exceeds 255 characters,
  1791. nor will commands which go beyond their length limit (usually 127
  1792. characters) be accepted.  Should you attempt to enter more than 255
  1793. characters on an input line, ANARKEY will beep and refuse to accept the
  1794. input.  Commands that exceed 127 characters are caught by ANARKEY after you
  1795. accept the input line (by hitting the <Enter> key).
  1796.  
  1797.    After pressing <Enter>, ANARKEY "breaks" the line into individual
  1798. commands based upon any translated semicolons.  It then checks to verify
  1799. that each command does not exceed the 127-character command-length limit.
  1800. If a command is found which exceeds the limit, ANARKEY will beep and
  1801. position the cursor under the first character beyond the allowable limit.
  1802. The character under the cursor and all subsequent characters in that command
  1803. go beyond the boundary.  In order to get ANARKEY to accept the command, you
  1804. must edit it so that it fits within the allowable length.
  1805.  
  1806.    In addition to this automatic length-check, you may have ANARKEY perform
  1807. a check at any time during line entry.  Simply invoke the Check-Command-
  1808. Length function by pressing the <F2> key.  This function performs the
  1809. command length check without passing the input line to ANARKEY for
  1810. acceptance.  If all commands are within the allowable range, nothing will
  1811. happen.  However, if a command is found which exceeds the boundary, ANARKEY
  1812. will beep and the cursor will be positioned under the first out-of-bounds
  1813. character.  This interactive length-check may be useful when you're trying
  1814. to squeeze one more file name in a command or an additional directory
  1815. specification in a PATH variable and you're not sure whether you've gone
  1816. past the limit.
  1817.  
  1818.    If all commands are within the allowable boundary, each is passed to the
  1819. command processor one at a time, as if they had each been entered on their
  1820. own input line.  When the command processor is finished executing a command
  1821. and requests another, ANARKEY will pass it the next command extracted from
  1822. the input line.  This cycle continues until all the commands on the input
  1823. line are passed to the command processor.  Notice that no multitasking
  1824. (simultaneous execution of multiple programs) occurs when entering multiple
  1825. commands on a line.  No command begins execution until the command preceding
  1826. it has completed.
  1827.  
  1828.    Note: LOAD, the ANARKEY Loader, may be executed from a multiple-command
  1829. line, however, it must be the LAST command in the line.  Any commands
  1830. following LOAD will not be executed.
  1831.  
  1832.    Multiple commands per line can be very useful in instances where the
  1833. creation of a batch file is unwarranted.  Sometimes a group of commands
  1834. needs to be executed, however, their execution is a one-time occurrence so a
  1835. batch file is not really necessary.  Such a situation may be the copying of
  1836. a group of files, as in:
  1837.  
  1838.         C>copy *.c \c\source;copy *.h \c\include;copy *.obj \c\objects
  1839.  
  1840.    In this example, rather than entering each command on their own input
  1841. line and waiting for each to complete so you can enter the next one, you can
  1842. enter them all at once and go get coffee while they're executing.
  1843.  
  1844.    Another use of multiple-commands which may not be obvious is for
  1845. documentation purposes.  A REM statement could be added to the input line
  1846. explaining the reason for the commands on the line.  For example:
  1847.  
  1848.         C>edlin corpx.txt ; rem Incorporate 12/14 proposal changes
  1849.         C>edlin prog.c ; make ; rem Enable debug statements
  1850.  
  1851.    If this is done on a regular basis, the exact sequence of events in any
  1852. daily operation can be documented by displaying the contents of the history
  1853. buffer (<F4>) or writing the buffer to a disk file (<Ctrl-W>).  (See the
  1854. documentation explaining the Full Disclosure (-F) installation option for
  1855. more information on this technique.)
  1856.  
  1857.  
  1858. Multiple-Command Lines and Secondary Shells
  1859. -------------------------------------------
  1860.  
  1861.    Multiple-command lines create one problematic situation, demonstrated in
  1862. the following input line:
  1863.  
  1864.         C>cd \text ; editor letter.doc ; cd \home
  1865.  
  1866.    Such a sequence of commands might be executed to temporarily move to a
  1867. working subdirectory, perform an operation (in this case, edit a file) and
  1868. then return to the starting directory.  Most modern editors and word
  1869. processors provide the capability to temporarily exit to a DOS command
  1870. prompt, execute one or more commands and then return to the original
  1871. program, picking up where it had left off.
  1872.  
  1873.    During such an operation, the exit to the DOS command prompt will result
  1874. in the command processor making a request for input.  Under normal
  1875. conditions, ANARKEY would return the next command in the multiple-command
  1876. line.  However, in this case, doing so would not be the desired response;
  1877. the next command should not be executed until the preceding command has
  1878. completed.  Thus, ANARKEY must handle this situation in a special manner.
  1879.  
  1880.    ANARKEY will automatically recognize the above-described condition.  When
  1881. it does, ANARKEY will not handle the request for input itself.  Instead, the
  1882. original DOS input handler is called to process the input request.  During
  1883. this time, none of the ANARKEY functions will be available.  Only after
  1884. exiting the secondary command processor, completing the original program and
  1885. returning to the original command prompt, will ANARKEY reactivate itself and
  1886. return the next command in the multiple-command line.
  1887.  
  1888.    All of this may seem a bit confusing and difficult to remember, however,
  1889. be aware that such situations will rarely occur and, when they do, ANARKEY
  1890. will handle them for you automatically.
  1891.  
  1892.  
  1893.  
  1894.                         Editing Environment Variables
  1895.                         -----------------------------
  1896.  
  1897.    It is often necessary to view the current value of a single environment
  1898. variable or to modify a variable's setting.  ANARKEY provides the capability
  1899. to recall and edit the value of any defined environment variable.  This is
  1900. especially handy when you have a long PATH setting and wish to add a single
  1901. directory to it.  DOS would require that you reenter the entire list of
  1902. directories.  ANARKEY will retrieve the current PATH value and allow you to
  1903. edit it as you wish.
  1904.  
  1905.    <F9>               -- Retrieve Environment Variable
  1906.    <Ctrl-E>
  1907.  
  1908.    To retrieve the current value of an environment variable, enter the DOS
  1909. SET command followed by the complete name of the variable.  Variable names
  1910. may be entered in upper or lowercase.  An equal sign may or may not follow
  1911. the environment variable name.  If an equal sign is not entered after the
  1912. variable name, ANARKEY will automatically enter it for you.
  1913.  
  1914.    As an example, if you wish to retrieve the current value of the COMSPEC
  1915. environment variable, enter:
  1916.  
  1917.                 C>set comspec_
  1918.  
  1919.    The underscore designates the location of the cursor.  When retrieving
  1920. environment variable values, the cursor should always reside immediately
  1921. after the last character of the variable's name.  Be aware that spaces are
  1922. allowed in environment variable names, therefore the names "COMSPEC" and
  1923. "COMSPEC " may exist simultaneously as two separate variables.  (DOS will
  1924. allow any character as part of an environment variable name except the
  1925. characters <, >, | and =.  ANARKEY adds the further restriction that they
  1926. may not contain a semicolon (;) character, either.)
  1927.  
  1928.    After entering the variable's complete name, invoke the Retrieve-
  1929. Environment-Variable function by pressing either <F9> or <Ctrl-E>.  ANARKEY
  1930. will insert an equal sign at the current cursor position.  If the specified
  1931. environment variable exists, its current value is displayed beginning
  1932. immediately after the equal sign.  If there is no such variable, no value is
  1933. displayed.  In either case, the cursor is positioned at the first character
  1934. after the inserted equal sign.
  1935.  
  1936.    Given the example presented above, invocation of the Retrieve-
  1937. Environment-Variable function might result in the following display:
  1938.  
  1939.                 C>set comspec=C:\DOS\COMMAND.COM
  1940.                               -
  1941.  
  1942.    The cursor would be positioned under the C drive specification,
  1943. immediately following the equal sign.  Any part of the line may now be
  1944. modified using the available editing functions.
  1945.  
  1946.    The Retrieve-Environment-Variable function may be used to recall variable
  1947. values simply to see to what value a specific variable is currently set.
  1948. This ability is most useful when a large number of environment variables
  1949. exist on a system and recalling all variables (as with a simple "SET"
  1950. command) would cause the variable list to scroll offscreen.  This situation
  1951. is becoming increasingly common as more and more programs require the
  1952. definition of multiple environment variables, usually for program
  1953. configuration purposes.
  1954.  
  1955.    Also, as previously suggested, environment variable retrieval is
  1956. extremely useful when you wish to edit a very long variable value, as is
  1957. often the case with the PATH variable.
  1958.  
  1959.    And speaking of PATH, DOS handles the PATH variable in a manner which is
  1960. slightly different from other environment variables.  PATH is special in
  1961. that it does not require the SET command to precede it on the input line.
  1962. SET may be used, but is not required as it is for other variables.  ANARKEY
  1963. supports this special handling of the PATH variable; it will retrieve the
  1964. current PATH value given either of the following input lines:
  1965.  
  1966.                 C>set path_
  1967.                 C>path_
  1968.  
  1969.    PROMPT is another environment variable that does not need to be prefaced
  1970. by the SET command.  ANARKEY handles PROMPT in exactly the same manner it
  1971. does PATH.
  1972.  
  1973.    Even though the examples show situations where the SET, PATH or PROMPT
  1974. command is the first and only command on the input line, this is not a
  1975. restriction of the Retrieve-Environment-Variable function.  The function may
  1976. be invoked upon any command on the input line, as in:
  1977.  
  1978.                 C>dir *.* ; set comspec_
  1979.  
  1980.    Use of the semicolon (;) character in environment variables AND as a
  1981. command separator presents a special problem.  For example, PATH and other
  1982. environment values commonly specify several directories, each separated by a
  1983. semicolon.  Normally, ANARKEY would interpret these single semicolons as
  1984. command separators.  To include an actual semicolon in the value would
  1985. require either two consecutive semicolons or the repression of multiple
  1986. commands (as explained in the "Entering Multiple Commands per Line"
  1987. section).  If this were the final situation, it would be particularly
  1988. annoying, at best.  Fortunately, ANARKEY makes provisions for this
  1989. condition.
  1990.  
  1991.    Since SET, PATH and, to a lesser extent, PROMPT commands are fairly
  1992. common, ANARKEY treats them as special cases.  While ANARKEY is breaking the
  1993. input line into individual commands, it checks each command to see if it is
  1994. SET, PATH or PROMPT.  If it is, semicolon/command separator translation is
  1995. immediately turned off for the remainder of the line.  All remaining
  1996. semicolon characters on the line are interpreted as straight semicolons.
  1997. Two consecutive semicolons are interpreted as two consecutive semicolons;
  1998. they are not translated to a single semicolon as they normally would with
  1999. translation.
  2000.  
  2001.    The consequence of this solution is that another command may not follow a
  2002. SET, PATH or PROMPT command on the same input line.  Since the semicolon
  2003. translation is turned off, there is no way of indicating the end of the
  2004. SET/PATH/PROMPT other than the end of the input line.  Other commands may
  2005. still precede a SET, PATH or PROMPT command.
  2006.  
  2007.    Other than the uses already mentioned, this function may also be used to
  2008. save a variable's current setting, temporarily modify it and eventually
  2009. restore the saved value.  For example, say you want a different PATH value
  2010. for a short period of time.  Either of the following sequences would save
  2011. you time:
  2012.  
  2013.         1) Recall the current PATH value.
  2014.         2) Using the editing functions, change the name of the PATH variable
  2015.            to SAVED PATH.  (Remember that spaces are valid characters within
  2016.            environment variable names.)  Be sure to precede "SAVED PATH"
  2017.            with a SET command; only PATH does not require it.  After you've
  2018.            hit <Enter>, you'll have two environment variables, PATH and
  2019.            SAVED PATH.
  2020.         3) Set the new PATH value.  (If the new value resembles the original
  2021.            value, you may want to retrieve the original value and edit it.)
  2022.         4) Execute the desired commands which will use the new PATH value.
  2023.         5) To restore the original PATH, retrieve the SAVED PATH variable
  2024.            (you'll need to use SET).  Rename the variable from SAVED PATH to
  2025.            PATH (you can delete the SET command, too).
  2026.  
  2027. Alternatively:
  2028.  
  2029.         1) Recall the current PATH value.
  2030.         2) Without making any modifications, accept the line by pressing
  2031.            <Enter>.  This will store the input line in the history buffer.
  2032.         3) Create your modified PATH value.
  2033.         4) Execute the commands which use the new value.
  2034.         5) Retrieve the input line previously stored in (2) by using the
  2035.            supported history buffer functions.  Acceptance of the retrieved
  2036.            line will restore the original variable value.
  2037.  
  2038.    The second method described above has the advantage of not requiring an
  2039. additional environment variable.  However, you may come across situations
  2040. where the first method is a more desirable solution.
  2041.  
  2042.    Keep this function in mind whenever environment variables are concerned
  2043. and further uses, often in conjunction with the other ANARKEY functions,
  2044. will make themselves known.
  2045.  
  2046.  
  2047.  
  2048.                             Installation Options
  2049.                             --------------------
  2050.  
  2051.    ANARKEY supports an assortment of configuration options which may be
  2052. specified during program installation.
  2053.  
  2054.    An option may be in upper or lowercase and each must be preceded by a
  2055. dash (-) or slash (/) character. All options are single characters, however,
  2056. some options require an additional argument which must appear immediately
  2057. after the option.  Options may appear in any order and each must be
  2058. separated by at least one space.
  2059.  
  2060.    An example ANARKEY installation line is:
  2061.  
  2062.         C>anarkey -f -b1000 -io
  2063.  
  2064.    The supported ANARKEY options are detailed in the remainder of this
  2065. section.
  2066.  
  2067.    The notational conventions used are:
  2068.         n       -- represents a numeric argument
  2069.         x       -- represents an alphanumeric argument
  2070.         []      -- an argument in brackets represents an optional argument
  2071.  
  2072.  
  2073.    -An                -- Allocate Space for AKA Definitions
  2074.         By default, AKAs are not supported by ANARKEY.  They must be enabled
  2075.         by the -A installation option.
  2076.  
  2077.         This option specifies how much space to reserve for AKA definitions.
  2078.         The amount of space is specified in number of characters.
  2079.  
  2080.         The total amount of space allocated for AKA storage and the history
  2081.         buffer (-H option) may not exceed 50,000 characters.  ANARKEY will
  2082.         automatically adjust the space allocated for AKA definitions if this
  2083.         limit is exceeded.
  2084.  
  2085.         To allocate enough space to store 400 characters of AKA definitions:
  2086.  
  2087.                 C>anarkey -a400
  2088.  
  2089.    -C                 -- Cursor Shape Remains Unchanged
  2090.         Normally, ANARKEY sets the cursor shape based upon the input mode.
  2091.         Use of this option will repress all changes of the cursor shape.
  2092.  
  2093.    -F                 -- Full Disclosure
  2094.         Under default operation, when a line is retrieved from the history
  2095.         buffer and then immediately accepted, ANARKEY moves the line to the
  2096.         end of the buffer.  Doing so prevents the buffer from becoming
  2097.         cluttered with duplicate lines.
  2098.  
  2099.         The -F option will repress this line movement and maintain the
  2100.         history buffer as a log of each line in their executed order.
  2101.  
  2102.    -Hn                -- History Buffer Size
  2103.         Create a history buffer capable of holding *n* number of characters.
  2104.         Buffer size may range from 255 to 50,000.  Default buffer size is
  2105.         500 characters.  If you try to set a buffer size less than 255 or
  2106.         greater than 50,000, ANARKEY will use the default value of 500.
  2107.  
  2108.         If AKA storage space is allocated (-A option), the total space used
  2109.         by the history buffer and AKA storage together may not exceed
  2110.         50,000.  ANARKEY will automatically adjust the space allocated for
  2111.         AKA definitions if this limit is exceeded.
  2112.  
  2113.         To allocate a history buffer of 10,000 characters:
  2114.  
  2115.                 C>anarkey -h10000
  2116.  
  2117.         Notice that commas should not be included as part of the size value.
  2118.  
  2119.    -Ix[F]             -- Input Mode on Powerup [and Start of Input Line]
  2120.         Set the initial input mode to insert(x = I) or overwrite(x = O)
  2121.         mode.  The default value of x is I (insert mode).
  2122.  
  2123.         The powerup input mode affects the cursor shape.  An underscore
  2124.         cursor is used in the powerup mode; the alternate mode uses a
  2125.         block-shaped cursor.  (Note: Changing cursor shapes can be repressed
  2126.         by using the -C option.)
  2127.  
  2128.         To start ANARKEY in overwrite mode:
  2129.  
  2130.                 C>anarkey -io
  2131.  
  2132.         During normal operation, ANARKEY will not change the input mode
  2133.         until you explicitly tell it to do so by invoking the
  2134.         Toggle-Insert/Overwrite-Mode function (<Ins>).
  2135.  
  2136.         Alternatively, ANARKEY may be configured to force the input mode
  2137.         back to the powerup setting at the start of each new input line.
  2138.         (Many of the alternative command-line editors operate this way by
  2139.         default.)  Simply append the 'F' option-modifier to the end of the
  2140.         -I option and ANARKEY will automatically force the input mode to the
  2141.         powerup setting whenever a new input line is requested.
  2142.  
  2143.         To start ANARKEY in overwrite mode and force the input mode to
  2144.         overwrite at the beginning of each new line:
  2145.  
  2146.                 C>anarkey -iof
  2147.  
  2148.         To start ANARKEY in insert mode and force it into that mode at the
  2149.         start of each line:
  2150.  
  2151.                 C>anarkey -iif
  2152.  
  2153.    -M                 -- Display ANARKEY Memory Usage
  2154.         The increasing size of application programs and DOS's limitation of
  2155.         640K of program memory have combined to make users count every byte
  2156.         their TSR programs eat up.  ANARKEY will tell you exactly how much
  2157.         memory it will request from DOS when the -M option is included on
  2158.         the installation command line.
  2159.  
  2160.         Add the -M option to any valid installation line and ANARKEY will
  2161.         calculate and display how much memory the specified configuration
  2162.         will require.  ANARKEY will not install itself; this option is for
  2163.         informational purposes only.
  2164.  
  2165.         To find out how much memory ANARKEY will request when configured
  2166.         with a 1000-character history buffer and 400 characters allocated
  2167.         for AKAs:
  2168.  
  2169.                 C>anarkey -a400 -h1000 -m
  2170.  
  2171.         Note:
  2172.            The memory usage displayed by the -M option is not the exact
  2173.         amount DOS will reserve for ANARKEY; it is the amount ANARKEY will
  2174.         ask DOS to reserve for it.  DOS only guarantees that it will reserve
  2175.         AT LEAST the amount of memory requested.  To the requested value
  2176.         will be added the space allocated for defined environment variables.
  2177.  
  2178.         Tip:
  2179.            When a program is executed, it is assigned a copy of all defined
  2180.         environment variables at the time of execution.  If that program
  2181.         remains resident, this environment space remains resident with it.
  2182.         You can reduce the amount of memory a resident program requires by
  2183.         installing it BEFORE defining all your environment variables.
  2184.  
  2185.    -Pn                -- ANARKEY Process Number
  2186.         When ANARKEY is run under DOS version 3.1 and later, it assigns
  2187.         to itself a process number which it later uses to determine if it
  2188.         is already installed.  There exists a small possibility that another
  2189.         TSR program will use the same process number ANARKEY wishes to use.
  2190.         If this is the case, ANARKEY will think it has already been
  2191.         installed when, in fact, it has not been.  To install ANARKEY in
  2192.         this situation, ANARKEY must use an alternative process number which
  2193.         is specified via this option.
  2194.  
  2195.         The default process number is 35.  Valid process numbers are 0 to
  2196.         63.
  2197.  
  2198.         Here is an example of a ANARKEY installation that uses an
  2199.         alternative process number of 14:
  2200.  
  2201.                 C>anarkey -p14
  2202.  
  2203.         If ANARKEY refuses to install, continue trying all valid process
  2204.         numbers.  (It will be extremely rare situations where this option
  2205.         will need to be used at all, let alone attempted several times.)
  2206.  
  2207.         This option is ignored under DOS versions earlier than 3.1.
  2208.  
  2209.    -Q                 -- Run ANARKEY in Quiet Mode
  2210.         In quiet mode, the bell will sound only in situations where no other
  2211.         form of error notification is provided.  For example, it will not
  2212.         sound after cycling through all filename or history buffer
  2213.         completions and no matches remain.  However, the bell will still
  2214.         ring if an AKA definition cannot be stored due to lack of storage
  2215.         space.
  2216.  
  2217.    -Sn                -- Shortest Line to Store in History Buffer
  2218.         Short input lines are often easier to retype than to retrieve from
  2219.         the history buffer.  Rather than have these short lines clutter the
  2220.         buffer, they can be excluded from ever being entered.
  2221.  
  2222.         The -S option specifies the shortest line length required for a line
  2223.         to be stored in the history buffer.  Lines of less length will not
  2224.         be entered.
  2225.  
  2226.         By default, ANARKEY stores all non-empty lines (-S1).  Empty lines
  2227.         are never stored in the history buffer, even if -S0 is specified.
  2228.  
  2229.         To store only lines of four or more characters:
  2230.  
  2231.                 C>anarkey -s4
  2232.  
  2233.    -U[S]              -- Translate Characters to UNIX Standards
  2234.         Many people prefer the DOS switch character, which is the slash(/)
  2235.         character by default, to be changed to conform to the UNIX operating
  2236.         system's standard of a dash(-).  Changing the switch character
  2237.         allows the slash to be used as a directory separator in a path
  2238.         specification, as in "C:/DOS/PROGS."  Dashes are used in situations
  2239.         where slashes used to be, for example, "DIR -W."
  2240.  
  2241.         DOS has an undocumented operating system function that will allow
  2242.         the alteration of the DOS switch character.  Many public domain
  2243.         programs exist that will use this undocumented function to change
  2244.         the switch character.  These programs are especially popular among
  2245.         people who alternate their time between DOS and UNIX systems.
  2246.  
  2247.         Unfortunately, the DOS function has a few peculiarities which make
  2248.         it a bit unstable.  Even worse, though, is the fact that the DOS 3.x
  2249.         compatibility box in OS/2 does not support the undocumented
  2250.         function at all, making it impossible to change the switch
  2251.         character.  The -U option is meant to solve these problems.
  2252.  
  2253.         When -U is specified on the installation command line, ANARKEY will
  2254.         perform character translations on all slash(/) and dash(-)
  2255.         characters contained in each accepted input line.  All slash
  2256.         characters are translated to backslashes(\) and dashes are changed
  2257.         to slashes(/).  This allows the UNIX-standard usage of the switch
  2258.         character and directory separator.
  2259.  
  2260.         For example,
  2261.  
  2262.               >DIR/              is translated to    >DIR\
  2263.               >CD /DOS/PROGS     is translated to    >CD \DOS\PROGS
  2264.               >DIR /DOS -P       is translated to    >DIR \DOS /P
  2265.               >XCOPY /*.* -S     is translated to    >XCOPY \*.* /S
  2266.  
  2267.         To enter an actual slash or dash on the input line, enter two
  2268.         consecutive characters.  For example,
  2269.  
  2270.               >DIR PROG--1.*     is translated to    >DIR PROG-1.*
  2271.               >LINK PROG //NOI;  is translated to    >LINK PROG /NOI;
  2272.               >LINK PROG -NOI;   is translated to    >LINK PROG /NOI;
  2273.  
  2274.         The S modifier may optionally be appended to the -U option (i.e.
  2275.         -US).  This will cause only slash characters to be translated;
  2276.         dashes will remain unchanged.  This is most useful if you run many
  2277.         programs that will accept only the dash character as a switch
  2278.         specifier.
  2279.  
  2280.         An example will best demonstrate this situation.  Say you use a DOS
  2281.         version of the UNIX LS command that will only accept a dash
  2282.         preceding each option.  To preserve the dash with ANARKEY installed
  2283.         with the -U option (i.e. to keep the dash from being translated to a
  2284.         slash), it would be necessary to enter consecutive dashes for each
  2285.         program invocation, as in:
  2286.  
  2287.               ls --l *.exe
  2288.  
  2289.         This is probably inconvenient.  Installing ANARKEY with -US will
  2290.         repress the translation of the dash and make the consecutive dashes
  2291.         unnecessary.  Unfortunately, -US has its own quirk; whenever you
  2292.         wish to enter a slash, you MUST enter consecutive slashes.  For
  2293.         example,
  2294.  
  2295.               copy *.exe a: //v
  2296.  
  2297.         Due to these quirks, neither of these options is entirely
  2298.         satisfactory.  They are provided for those users who desire the
  2299.         convenience of using the slash character in path specifications and
  2300.         are willing to put up with the resulting oddities.  Depending on the
  2301.         characteristics of the programs you run, -U or -US will be more
  2302.         appropriate.
  2303.  
  2304.         UNIX-standard character translation occurs after any AKA
  2305.         substitution.
  2306.  
  2307.         Note: This option has one disadvantage over the undocumented
  2308.         function call: since ANARKEY is not active when processing batch
  2309.         files, it cannot perform the character translation in commands
  2310.         executed from a batch file.  For this reason, it may be more
  2311.         desirable to continue to use the undocumented function when running
  2312.         under DOS.  However, as mentioned, the OS/2 DOS 3.x compatibility
  2313.         box provides no support for changing the switch character.  When
  2314.         running in this environment, the -U[S] option is the only way to go.
  2315.  
  2316.    -Xxxx              -- Exclude File Extension
  2317.         Add a file extension to the ignored-extensions list used during a
  2318.         filename-completion operation.
  2319.  
  2320.         During filename completion, ANARKEY automatically ignores all files
  2321.         with the following extensions:
  2322.  
  2323.                 .$$$    .BAK    .BIN    .COM    .EXE    .HEX
  2324.                 .LIB    .OBJ    .OVR    .SYS    .TMP
  2325.  
  2326.         To include additional extensions in this list, specify them using
  2327.         the -X option.  An installation configuration may contain up to six
  2328.         -X options.  Standard DOS wildcard characters '?' and '*' are
  2329.         supported.
  2330.  
  2331.         Example:
  2332.  
  2333.                 C>anarkey -xtxt -xbat -xq* -x??v
  2334.  
  2335.         The above line would cause ANARKEY to ignore all files with a .TXT
  2336.         or .BAT extension and any extension that started with a 'Q' or ended
  2337.         with a 'V'.
  2338.  
  2339.         -X\ is a special case option that will clear the entire extension
  2340.         list.  Use -X\ if you do not wish to use the default extensions
  2341.         listed above.  -X\ should be specified prior to any other -X options
  2342.         so as to prevent clearing any extensions you've added to the list.
  2343.         -X\ does not count toward one of the possible six -X options.
  2344.  
  2345.  
  2346.  
  2347.                              ANARKEY Internals
  2348.                              -----------------
  2349.  
  2350.    This section documents some of the inner workings of the ANARKEY program.
  2351. It is not necessary to read and understand this section in order to use
  2352. ANARKEY.  The information is provided for those people who prefer to know
  2353. something about the internal operations of the programs which they run.
  2354. Those people with no interest in this area may safely skip this section and
  2355. proceed to the next.
  2356.  
  2357.    The following discussion assumes the reader has a general understanding
  2358. of DOS functions and TSR program structure.
  2359.  
  2360.    Upon installation, ANARKEY hooks into two interrupts:
  2361.  
  2362.         1) Interrupt used to install program signature
  2363.                 -DOS versions before 3.1 use one interrupt between 60h-67h
  2364.                 -DOS 3.1 and later use interrupt 2Fh
  2365.         2) Interrupt 21h, function 0Ah
  2366.  
  2367.    Upon initial program execution, a program "signature" is installed which
  2368. is used by ANARKEY to prevent itself from being installed more than once.
  2369. Depending upon the DOS version, a different method of signature installation
  2370. is performed.
  2371.  
  2372.    Under DOS 2.x thru 3.0, ANARKEY scans interrupt vectors 60h thru 67h
  2373. searching for an unused vector (signified by a null value).  If an unused
  2374. vector is found, ANARKEY takes it and installs its program signature there.
  2375. If all the vectors are in use, ANARKEY does not install a program signature.
  2376.  
  2377.    In the latter case, it will be possible to reinstall ANARKEY again,
  2378. although doing so is not recommended.  (A reinstalled ANARKEY will not hang
  2379. your system, however, you will lose both the contents of your current
  2380. history buffer and the memory used by the originally-installed program.)  If
  2381. ANARKEY cannot install its signature, it will display a message stating as
  2382. much and continue execution.  This message should be considered a warning
  2383. that the automatic installation mechanism built-in to ANARKEY will not be
  2384. able to save you should you inadvertently reinstall it.
  2385.  
  2386.    Running DOS 3.1 and later, ANARKEY chains into interrupt 2Fh.  This is
  2387. the multiplex interrupt and is shared between the PRINT, SHARE and other TSR
  2388. programs.  Programs chaining into this interrupt assign themselves a
  2389. "process number" which is used for identification purposes.  Process numbers
  2390. 0C0h thru 0FFh are reserved for user programs.  By default, ANARKEY
  2391. appropriates process number 0E3h.  Upon program initialization, ANARKEY
  2392. queries the appropriate process number to check if it has already been
  2393. installed.
  2394.  
  2395.    If this process number is being used by another TSR program, ANARKEY will
  2396. believe that it has already been installed.  It will display a message
  2397. stating as much and refuse to continue execution.  If this is the case, the
  2398. installation option -P may be used to install ANARKEY under a different
  2399. process number.  (The -P option is documented in the "Installation Options,
  2400. ANARKEY Process Number" section.  Notice that the -P argument which
  2401. specifies the new process number has been "de-programmer-ized."  Process
  2402. numbers are specified in decimal and range from 0 to 63.  The
  2403. de-programmer-ized value is first added to 0C0h (re-programmer-ized?) before
  2404. being used for installation.)
  2405.  
  2406.    Once ANARKEY has verified that it is not already installed, it hooks into
  2407. interrupt 21h, function 0Ah, the buffered input routine.  The resident
  2408. portion of ANARKEY is a replacement for this function, the standard version
  2409. of which is provided by the operating system.
  2410.  
  2411.    After installing its signature and hooking into the buffered input
  2412. interrupt, ANARKEY terminates its execution, but remains resident in system
  2413. memory.  Most subsequent calls for buffered input will be handled by
  2414. ANARKEY.
  2415.   
  2416.  
  2417.  
  2418.                            Special Considerations
  2419.                            ----------------------
  2420.  
  2421.    A few situations exist in which ANARKEY must operate in a special manner.
  2422. Each of these special and rare circumstances are described in this section.
  2423.  
  2424. Redirecting Output to a Serial Terminal
  2425. ---------------------------------------
  2426.    When output is redirected to a serial terminal, i.e. the COM device, a
  2427. special set of problems arises.  Due to the many different characteristics
  2428. of serial terminal displays, it is difficult to implement many of the
  2429. ANARKEY functions so that they are compatible with all available terminals.
  2430. Because output redirection to a COM device is a relatively rare occurence,
  2431. ANARKEY handles this situation in a special manner.
  2432.  
  2433.    When output is redirected to a COM device, either by using the
  2434. redirection character ('>') or executing the CTTY program, ANARKEY will
  2435. temporarily disable itself.  ANARKEY will remain disabled until output is no
  2436. longer redirected to the COM device, at which time it will re-enable itself.
  2437. Notice that ANARKEY will recognize this situation on its own and will handle
  2438. it appropriately; there is no need for the user to do anything special.
  2439.  
  2440. Incompatible Programs
  2441. ---------------------
  2442.    Some programs are not 100% compatible with ANARKEY.  Known
  2443. incompatibilities are documented here.
  2444.  
  2445.    -- SIDEKICK
  2446.         Old versions of Borland's SIDEKICK will not correctly execute lines
  2447.         containing multiple commands.  After executing the first command on
  2448.         the line, SIDEKEY will pause before allowing subsequent commands to
  2449.         run.  Pressing any key will cause the remaining commands to execute.
  2450.         To solve this problem, upgrade to a newer version of SIDEKICK.
  2451.  
  2452.    -- TOPS
  2453.         The TOPS local area network alters some of the keystroke codes
  2454.         received as input from the keyboard.  This results in problems when
  2455.         reassigning keystrokes using ANARKED, the ANARKEY Keystroke Editor.
  2456.  
  2457.         This problem may be gotten around by restricting key assignments to
  2458.         only those keystrokes not altered by TOPS.  Finding those keys that
  2459.         are altered is a try-and-see operation (i.e. "try" the keystroke and
  2460.         "see" if ANARKED handles it correctly).
  2461.  
  2462.  
  2463.  
  2464.                              Future Directions
  2465.                              -----------------
  2466.  
  2467.    ANARKEY is a powerful and extremely useful program in its current state.
  2468. However, I believe that everything can be improved upon and ANARKEY is no
  2469. exception.  I foresee the future direction of ANARKEY to be primarily
  2470. user-driven.  For this to be possible, I need your comments and suggestions.
  2471.  
  2472.    After you've used the program for a while, please take a few minutes to
  2473. let me know what you think.  I welcome and strongly encourage suggestions
  2474. concerning additional features you would like to see added to ANARKEY.  I am
  2475. also very interested in hearing about the current features that you find
  2476. most useful and those that you don't use very often, if at all.  Also, if
  2477. you decide that ANARKEY is not a useful tool, I would like to know what
  2478. features you believe it lacks.  All comments - the good, the bad and the
  2479. ugly - will receive serious consideration and are strongly encouraged.
  2480.  
  2481.  
  2482.  
  2483.                             The Spirit of ANARKEY
  2484.                             ---------------------
  2485.  
  2486.    While walking down a city sidewalk several years ago, I noticed a crowd
  2487. of people gathering around the corner about a block ahead of me.  Normally,
  2488. I try to avoid crowds at all costs, but this one was directly in my path and
  2489. seemed peaceful, so I decided to continue ahead and see what the attraction
  2490. was.
  2491.  
  2492.    Arriving closer, music could be heard coming from within the crowd.
  2493. There, in its center, stood a street-corner musician, a lone saxophone
  2494. player.  The musician blew a sweet and gentle song on his horn, a song I had
  2495. never heard before, but which I instantly recognized.
  2496.  
  2497.    As I stood listening to this music, the atmosphere around me seemed to
  2498. change.  The typical rush of the city street was calmed by each note.  Sharp
  2499. edges were smoothed.  I felt as though I had been transported to a spring
  2500. forest, light greens and blues all around.  I stood on the edge of a clear,
  2501. flat pond where each long, cool note from the saxophone floated on the
  2502. glassy surface.  The world became relaxed, friendly and a bit melancholy.
  2503. Each note was so palpable, I could hold it in my open palm.
  2504.  
  2505.    External noises entered.  The rhythmic breeze of passing cars, the
  2506. syncopated percussion of conversation, all joined in to create a sweet, sad
  2507. symphony.  A blanket had been placed over the area and we all existed
  2508. beneath its protective cover.  The song floated on and the blanket slowly
  2509. descended, enveloping each person, every object.
  2510.  
  2511.    Eventually, the saxophone sounds ebbed and drifted off, slowly
  2512. evaporating.  For an elongated second, the crowd basked in the remaining
  2513. wisps of sound.  Then polite applause.
  2514.  
  2515.    Afterward, the musician stood beside his open music case, graciously
  2516. accepting the offerings of the appreciative crowd.  I remember thinking,
  2517. "What a wonderful way to live.  Making your way in the world playing such
  2518. sweet music.  That's the way I want to spend my life."  I began saxophone
  2519. lessons shortly afterward.
  2520.  
  2521.    Unfortunately, talent does not always come in the same amount as desire.
  2522. Sustained attempts to woo the elusive songbird proved fruitless.  The tears
  2523. that would well up in my listener's eyes were not the product of a song's
  2524. passionate beauty, but rather of its painful rendition and total
  2525. destruction.  The local dogs would howl in protest whenever I blew.  In
  2526. rapid succession, half the homes in my neighborhood went up for sale.  The
  2527. signs eventually became too numerous to ignore.  The frequency of my
  2528. practice sessions declined in reverse proportion to my realization that I
  2529. was a musical wretch.
  2530.  
  2531.    As a result, I began to spend more time in front of a computer writing
  2532. programs, a different kind of song, and an area in which I displayed at
  2533. least a modicum of ability.  With passing time, the dream of playing sweet
  2534. music on a street corner faded.  But I never forgot that street musician.
  2535.  
  2536.    And so, it is in the spirit of a street-corner musician that I dedicate
  2537. ANARKEY.  I call software created in this spirit "Frustrated-Musicianware."
  2538. I hope you find ANARKEY to be as sweet a song as I wish I could play on a
  2539. saxophone.  If so, won't you please take the time to register it?
  2540.  
  2541.    Like a street-corner musician, I stand beside my open computer case,
  2542. graciously accepting your appreciative gestures.
  2543.  
  2544.  
  2545.    Please send your registration form, suggestions and comments to:
  2546.  
  2547.                                 Steven Calwas
  2548.                                Moderne Software
  2549.                                 P.O. Box 3638
  2550.                           Santa Clara, CA 95055-3638
  2551.  
  2552.                               _______
  2553.                          ____|__     |               (tm)
  2554.                       --|       |    |-------------------
  2555.                         |   ____|__  |  Association of
  2556.                         |  |       |_|  Shareware
  2557.                         |__|   o   |    Professionals
  2558.                       -----|   |   |---------------------
  2559.                            |___|___|    MEMBER
  2560.  
  2561.